From 60ce0ed411305d5bae38ab78921e7b0255207ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Wed, 26 Jun 2019 14:20:17 +0200 Subject: [PATCH] Prevent "idna" test failures with libidn2 2.2.0+ libidn2 2.2.0+ parses Punycode more strictly than older versions and thus "dig +idnin +noidnout xn--19g" fails with libidn2 2.2.0+ but succeeds with older versions. We could preserve the old behavior by using the IDN2_NO_ALABEL_ROUNDTRIP flag available in libidn2 2.2.0+, but: - this change in behavior is considered a libidn2 bug fix [1], - we want to make sure dig behaves as expected, not libidn2, - implementing that would require additional configure.ac cruft. Removing the problematic check appears to be the simplest solution as it does not prevent the relevant block of checks in the "idna" system test from achieving its purpose, i.e. ensuring dig properly handles invalid U-labels. [1] see upstream commit 241e8f486134793cb0f4a5b0e5817a97883401f5 --- bin/tests/system/idna/tests.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/tests/system/idna/tests.sh b/bin/tests/system/idna/tests.sh index bafa33e292..bb2514293d 100644 --- a/bin/tests/system/idna/tests.sh +++ b/bin/tests/system/idna/tests.sh @@ -313,8 +313,10 @@ idna_enabled_test() { # when they are received in DNS responses to ensure no IDNA2003 fallbacks # are in place. # - # Note that an invalid U-label is accepted even when +idnin is in effect - # because "xn--19g" is valid Punycode. + # Note that "+idnin +noidnout" is not tested because libidn2 2.2.0+ parses + # Punycode more strictly than older versions and thus dig fails with that + # combination of options with libidn2 2.2.0+ but succeeds with older + # versions. # # +noidnout: "dig" should send the ACE string to the server and display the # returned qname. @@ -326,7 +328,6 @@ idna_enabled_test() { idna_test "$text" "" "xn--19g" "xn--19g." idna_test "$text" "+noidnin +noidnout" "xn--19g" "xn--19g." idna_fail "$text" "+noidnin +idnout" "xn--19g" - idna_test "$text" "+idnin +noidnout" "xn--19g" "xn--19g." idna_fail "$text" "+idnin +idnout" "xn--19g" }