0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/internet
Ben Noordhuis f399b01dc4
dns: use IDNA 2008 to encode non-ascii hostnames
Before this commit, Node.js left it up to the system resolver or c-ares.

Leaving it to the system resolver introduces platform differences
because:

* some support IDNA 2008
* some only IDNA 2003 (glibc until 2.28), and
* some don't support IDNA at all (musl libc)

c-ares doesn't support IDNA either although curl does, by virtue of
linking against libidn2. Upgrading from libidn1 to libidn2 in order
to get proper IDNA 2008 support was the fix for curl's CVE-2016-8625.

libidn2 is not an option (incompatible license) but ICU has an IDNA API
and we already use that in one place. For non-ICU builds, we fall back
to the bundled punycode.js that also supports IDNA 2008.

Fixes: https://github.com/nodejs-private/security/issues/97
Fixes: https://github.com/nodejs/node/issues/25558

PR-URL: https://github.com/nodejs/node/pull/25679
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2019-01-28 20:42:44 +01:00
..
test-dgram-broadcast-multi-process.js test: remove unused catch bindings 2018-11-06 10:59:18 -05:00
test-dgram-membership.js test: remove assert.doesNotThrow() 2018-02-16 16:53:47 +01:00
test-dgram-multicast-multi-process.js test: remove unused catch bindings 2018-11-06 10:59:18 -05:00
test-dgram-multicast-set-interface-lo.js test: rename some allegories 2018-08-14 17:54:40 +03:00
test-dgram-send-cb-quelches-error.js
test-dns-any.js test: make crashOnUnhandleRejection opt-out 2018-07-19 08:47:28 +02:00
test-dns-cares-domains.js
test-dns-idna2008.js dns: use IDNA 2008 to encode non-ascii hostnames 2019-01-28 20:42:44 +01:00
test-dns-ipv4.js test: make crashOnUnhandleRejection opt-out 2018-07-19 08:47:28 +02:00
test-dns-ipv6.js test: make crashOnUnhandleRejection opt-out 2018-07-19 08:47:28 +02:00
test-dns-lookup.js test: add dns.onlookupall() to increase coverage 2018-09-27 05:40:12 +02:00
test-dns-promises-resolve.js test: allow tests to pass without internet 2018-07-21 09:22:44 -04:00
test-dns-regress-6244.js
test-dns-setserver-in-callback-of-resolve4.js
test-dns-txt-sigsegv.js test: make crashOnUnhandleRejection opt-out 2018-07-19 08:47:28 +02:00
test-dns.js test: improve internet/test-dns 2018-12-12 07:15:07 -08:00
test-http-dns-fail.js
test-http-https-default-ports.js test: refactor http-https-default-ports 2018-03-09 15:16:31 +00:00
test-inspector-help-page.js test: verify inspector help url works 2018-04-10 15:42:32 -04:00
test-net-connect-timeout.js
test-net-connect-unref.js test: remove setTimeout in test-net-connect-unref 2018-07-26 16:43:21 -07:00
test-tls-add-ca-cert.js
test-tls-connnect-melissadata.js
test-tls-reuse-host-from-socket.js test: use shorthand properties 2018-01-17 14:33:20 +01:00
test-trace-events-dns.js test: don't inspect values if not necessary 2018-09-18 13:12:34 +02:00
test-uv-threadpool-schedule.js test: tune test-uv-threadpool-schedule 2019-01-07 19:08:05 -08:00
testcfg.py