From 22dc2e19bb08143cd9e187bbcaab90cc469365cd Mon Sep 17 00:00:00 2001 From: Tushar Verma Date: Thu, 11 Jun 2026 23:36:12 +0530 Subject: [PATCH 1/2] test(idn-hostname): reject A-labels that decode to an invalid U-label --- tests/draft2019-09/optional/format/idn-hostname.json | 12 ++++++++++++ tests/draft2020-12/optional/format/idn-hostname.json | 12 ++++++++++++ tests/draft7/optional/format/idn-hostname.json | 12 ++++++++++++ tests/v1/format/idn-hostname.json | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/tests/draft2019-09/optional/format/idn-hostname.json b/tests/draft2019-09/optional/format/idn-hostname.json index 45ccf3338..c57a3ce8b 100644 --- a/tests/draft2019-09/optional/format/idn-hostname.json +++ b/tests/draft2019-09/optional/format/idn-hostname.json @@ -331,6 +331,18 @@ "description": "empty string", "data": "", "valid": false + }, + { + "description": "A-label that decodes to a disallowed code point is invalid", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5892#section-2.6", + "data": "xn--7a", + "valid": false + }, + { + "description": "A-label that decodes to a Bidi rule violation is invalid", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5893", + "data": "xn--0ca24w", + "valid": false } ] }, diff --git a/tests/draft2020-12/optional/format/idn-hostname.json b/tests/draft2020-12/optional/format/idn-hostname.json index 3bb59820b..7128bc4b7 100644 --- a/tests/draft2020-12/optional/format/idn-hostname.json +++ b/tests/draft2020-12/optional/format/idn-hostname.json @@ -331,6 +331,18 @@ "description": "empty string", "data": "", "valid": false + }, + { + "description": "A-label that decodes to a disallowed code point is invalid", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5892#section-2.6", + "data": "xn--7a", + "valid": false + }, + { + "description": "A-label that decodes to a Bidi rule violation is invalid", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5893", + "data": "xn--0ca24w", + "valid": false } ] }, diff --git a/tests/draft7/optional/format/idn-hostname.json b/tests/draft7/optional/format/idn-hostname.json index 53faa3967..65366dcb2 100644 --- a/tests/draft7/optional/format/idn-hostname.json +++ b/tests/draft7/optional/format/idn-hostname.json @@ -323,6 +323,18 @@ "description": "empty string", "data": "", "valid": false + }, + { + "description": "A-label that decodes to a disallowed code point is invalid", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5892#section-2.6", + "data": "xn--7a", + "valid": false + }, + { + "description": "A-label that decodes to a Bidi rule violation is invalid", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5893", + "data": "xn--0ca24w", + "valid": false } ] }, diff --git a/tests/v1/format/idn-hostname.json b/tests/v1/format/idn-hostname.json index 08e9191b8..8f0646266 100644 --- a/tests/v1/format/idn-hostname.json +++ b/tests/v1/format/idn-hostname.json @@ -331,6 +331,18 @@ "description": "empty string", "data": "", "valid": false + }, + { + "description": "A-label that decodes to a disallowed code point is invalid", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5892#section-2.6", + "data": "xn--7a", + "valid": false + }, + { + "description": "A-label that decodes to a Bidi rule violation is invalid", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5893", + "data": "xn--0ca24w", + "valid": false } ] }, From a7edb07d5d56a8f20d02658abf9111b564c7516c Mon Sep 17 00:00:00 2001 From: Tushar Verma Date: Fri, 12 Jun 2026 00:02:29 +0530 Subject: [PATCH 2/2] test(idn-hostname): use rfc-editor.org for RFC links --- tests/draft2019-09/optional/format/idn-hostname.json | 4 ++-- tests/draft2020-12/optional/format/idn-hostname.json | 4 ++-- tests/draft7/optional/format/idn-hostname.json | 4 ++-- tests/v1/format/idn-hostname.json | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/draft2019-09/optional/format/idn-hostname.json b/tests/draft2019-09/optional/format/idn-hostname.json index c57a3ce8b..26e461467 100644 --- a/tests/draft2019-09/optional/format/idn-hostname.json +++ b/tests/draft2019-09/optional/format/idn-hostname.json @@ -334,13 +334,13 @@ }, { "description": "A-label that decodes to a disallowed code point is invalid", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5892#section-2.6", + "comment": "https://www.rfc-editor.org/rfc/rfc5890#section-2.3.2.1 https://www.rfc-editor.org/rfc/rfc5892#section-2.6", "data": "xn--7a", "valid": false }, { "description": "A-label that decodes to a Bidi rule violation is invalid", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5893", + "comment": "https://www.rfc-editor.org/rfc/rfc5890#section-2.3.2.1 https://www.rfc-editor.org/rfc/rfc5893", "data": "xn--0ca24w", "valid": false } diff --git a/tests/draft2020-12/optional/format/idn-hostname.json b/tests/draft2020-12/optional/format/idn-hostname.json index 7128bc4b7..f90f3f95d 100644 --- a/tests/draft2020-12/optional/format/idn-hostname.json +++ b/tests/draft2020-12/optional/format/idn-hostname.json @@ -334,13 +334,13 @@ }, { "description": "A-label that decodes to a disallowed code point is invalid", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5892#section-2.6", + "comment": "https://www.rfc-editor.org/rfc/rfc5890#section-2.3.2.1 https://www.rfc-editor.org/rfc/rfc5892#section-2.6", "data": "xn--7a", "valid": false }, { "description": "A-label that decodes to a Bidi rule violation is invalid", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5893", + "comment": "https://www.rfc-editor.org/rfc/rfc5890#section-2.3.2.1 https://www.rfc-editor.org/rfc/rfc5893", "data": "xn--0ca24w", "valid": false } diff --git a/tests/draft7/optional/format/idn-hostname.json b/tests/draft7/optional/format/idn-hostname.json index 65366dcb2..6f79ff5ef 100644 --- a/tests/draft7/optional/format/idn-hostname.json +++ b/tests/draft7/optional/format/idn-hostname.json @@ -326,13 +326,13 @@ }, { "description": "A-label that decodes to a disallowed code point is invalid", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5892#section-2.6", + "comment": "https://www.rfc-editor.org/rfc/rfc5890#section-2.3.2.1 https://www.rfc-editor.org/rfc/rfc5892#section-2.6", "data": "xn--7a", "valid": false }, { "description": "A-label that decodes to a Bidi rule violation is invalid", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5893", + "comment": "https://www.rfc-editor.org/rfc/rfc5890#section-2.3.2.1 https://www.rfc-editor.org/rfc/rfc5893", "data": "xn--0ca24w", "valid": false } diff --git a/tests/v1/format/idn-hostname.json b/tests/v1/format/idn-hostname.json index 8f0646266..074f7fa6d 100644 --- a/tests/v1/format/idn-hostname.json +++ b/tests/v1/format/idn-hostname.json @@ -334,13 +334,13 @@ }, { "description": "A-label that decodes to a disallowed code point is invalid", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5892#section-2.6", + "comment": "https://www.rfc-editor.org/rfc/rfc5890#section-2.3.2.1 https://www.rfc-editor.org/rfc/rfc5892#section-2.6", "data": "xn--7a", "valid": false }, { "description": "A-label that decodes to a Bidi rule violation is invalid", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5893", + "comment": "https://www.rfc-editor.org/rfc/rfc5890#section-2.3.2.1 https://www.rfc-editor.org/rfc/rfc5893", "data": "xn--0ca24w", "valid": false }