summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2017-01-28 09:26:05 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-01-28 09:27:11 +0100
commitb4b2482af1502eb9663f399b35a39c9af6ce0bb5 (patch)
tree88918dad53a25f72d3bf75212deece5522343af5
parent832b4b82844b0521e9fd6d3a738472bfc2814729 (diff)
downloadgnutls-b4b2482af1502eb9663f399b35a39c9af6ce0bb5.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.c5
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;