]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
idn: more strictly check AppleIDN errors
authorBo Anderson <mail@boanderson.me>
Wed, 7 Aug 2024 02:18:34 +0000 (03:18 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 7 Aug 2024 12:59:07 +0000 (14:59 +0200)
UIDNA API returns two error values but we were only checking one.
Checking both better aligns the behaviour with that of libidn2.

Closes #14431

docs/KNOWN_BUGS
lib/idn.c
tests/data/DISABLED

index cc5f1dd289be31a429334a491dccfe17b49ea936..fce0f0ec9c2424af1d608991c90079a9974ffa82 100644 (file)
@@ -85,7 +85,6 @@ problems may have been fixed or changed somewhat since this was written.
  11.4 HTTP test server 'connection-monitor' problems
  11.5 Connection information when using TCP Fast Open
  11.6 test cases sometimes timeout
- 11.7 AppleIDN test failures
  11.8 WinIDN test failures
 
  12. LDAP
@@ -528,12 +527,6 @@ problems may have been fixed or changed somewhat since this was written.
 
  See https://github.com/curl/curl/issues/13350
 
-11.7 AppleIDN test failures
-
- Test 1035 fail on macOS when built to use AppleIDN.
-
- See https://github.com/curl/curl/issues/14176
-
 11.8 WinIDN test failures
 
  Test 165 disabled when built with WinIDN.
index b1c1fcaa6250670001aa6297cdffab8b6bca7981..ac17718ef5e244df695287900473aa2086b35b57 100644 (file)
--- a/lib/idn.c
+++ b/lib/idn.c
@@ -106,7 +106,7 @@ static CURLcode mac_idn_to_ascii(const char *in, char **out)
         (void)uidna_nameToASCII_UTF8(idna, iconv_buffer, (int)iconv_outlen,
                                      buffer, sizeof(buffer) - 1, &info, &err);
         uidna_close(idna);
-        if(!U_FAILURE(err)) {
+        if(!U_FAILURE(err) && !info.errors) {
           *out = strdup(buffer);
           if(*out)
             return CURLE_OK;
index 0e6c79767af6a917a790c70ccb754ef1c25f028a..5d20fa2fbaf26e97023692e225737fb7805677f0 100644 (file)
@@ -93,9 +93,6 @@
 %if bearssl
 313
 %endif
-%if AppleIDN
-1035
-%endif
 %if WinIDN
 165
 %endif