diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-01-28 09:26:05 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-01-28 09:28:13 +0100 |
commit | c4417d6db5a96217a1cc7958b6f3ecb5629832c3 (patch) | |
tree | 5e5d68f1cbd5f12502fa68e706a8497edcc027a5 | |
parent | 32c5287ab9c3d0a980e8261394f5f421ce53a4e2 (diff) | |
download | gnutls-c4417d6db5a96217a1cc7958b6f3ecb5629832c3.tar.gz |
_idn2_to_unicode_8z8z: do not err on mixed IDNA domains
That is allow domains of the form 'großes.xn--fa-hia.de'. The
drawback is that we may not err early on invalid formatted
names. We however delegate any such decisions to libidn2.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-rw-r--r-- | lib/str-idna.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/str-idna.c b/lib/str-idna.c index c7298acc24..9e4548a4d6 100644 --- a/lib/str-idna.c +++ b/lib/str-idna.c @@ -164,11 +164,8 @@ static int _idn2_to_unicode_8z8z(const char *src, char **dst) out_len = 0; for (e = s = src; *e; s = e) { - while (*e && *e != '.') { - if ((unsigned char)*e >= 0x80) - return IDN2_ENCODING_ERROR; + while (*e && *e != '.') e++; - } if (e - s > 4 && (s[0] == 'x' || s[0] == 'X') && (s[1] == 'n' || s[1] == 'N') && s[2] == '-' && s[3] == '-') { size_t u32len = IDN2_LABEL_MAX_LENGTH * 4; |