From a79ea12726ac12dab394409b5c80324a3859394b Mon Sep 17 00:00:00 2001 From: Tushar Verma Date: Mon, 13 Apr 2026 08:47:35 +0530 Subject: [PATCH] test(hostname): move XN-- positions-3-4 test to A-label group MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test #20 in Group 1 marks XN--aa---o47jg78q as invalid citing RFC 5891 §4.2.3.1 and RFC 5890 §2.3.2.1 (IDNA2008). Group 1 is scoped to RFC 1123 §2.1 which has no positions-3-4 rule. Group 2 is explicitly 'validation of A-label (punycode) host names' and contains all other RFC 5891/5892 tests. This test belongs in Group 2. Moving it there for draft7, draft2019-09, draft2020-12, and v1. draft4 and draft6 have no Group 2 so no changes needed there. Note: draft4 accepts xn--4gbwdl.xn--wgbh1c in Group 1 with no complaint — same structural pattern as XN--aa---o47jg78q. This confirms the positions-3-4 rule is IDNA2008 scope not RFC 1123. --- tests/draft2019-09/optional/format/hostname.json | 12 ++++++------ tests/draft2020-12/optional/format/hostname.json | 12 ++++++------ tests/draft7/optional/format/hostname.json | 12 ++++++------ tests/v1/format/hostname.json | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/draft2019-09/optional/format/hostname.json b/tests/draft2019-09/optional/format/hostname.json index 46304bc3..1c7fce1b 100644 --- a/tests/draft2019-09/optional/format/hostname.json +++ b/tests/draft2019-09/optional/format/hostname.json @@ -101,12 +101,6 @@ "data": "hostname-", "valid": false }, - { - "description": "contains \"--\" in the 3rd and 4th position", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", - "data": "XN--aa---o47jg78q", - "valid": false - }, { "description": "contains underscore", "data": "host_name", @@ -355,6 +349,12 @@ "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", "data": "xn--ngba5hb2804a", "valid": true + }, + { + "description": "contains \"--\" in the 3rd and 4th position", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", + "data": "XN--aa---o47jg78q", + "valid": false } ] } diff --git a/tests/draft2020-12/optional/format/hostname.json b/tests/draft2020-12/optional/format/hostname.json index 511995ae..8d721d92 100644 --- a/tests/draft2020-12/optional/format/hostname.json +++ b/tests/draft2020-12/optional/format/hostname.json @@ -101,12 +101,6 @@ "data": "hostname-", "valid": false }, - { - "description": "contains \"--\" in the 3rd and 4th position", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", - "data": "XN--aa---o47jg78q", - "valid": false - }, { "description": "contains underscore", "data": "host_name", @@ -355,6 +349,12 @@ "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", "data": "xn--ngba5hb2804a", "valid": true + }, + { + "description": "contains \"--\" in the 3rd and 4th position", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", + "data": "XN--aa---o47jg78q", + "valid": false } ] } diff --git a/tests/draft7/optional/format/hostname.json b/tests/draft7/optional/format/hostname.json index 32e103d1..d9da0fcc 100644 --- a/tests/draft7/optional/format/hostname.json +++ b/tests/draft7/optional/format/hostname.json @@ -98,12 +98,6 @@ "data": "hostname-", "valid": false }, - { - "description": "contains \"--\" in the 3rd and 4th position", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", - "data": "XN--aa---o47jg78q", - "valid": false - }, { "description": "contains underscore", "data": "host_name", @@ -349,6 +343,12 @@ "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", "data": "xn--ngba5hb2804a", "valid": true + }, + { + "description": "contains \"--\" in the 3rd and 4th position", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", + "data": "XN--aa---o47jg78q", + "valid": false } ] } diff --git a/tests/v1/format/hostname.json b/tests/v1/format/hostname.json index df2da272..a92c33f5 100644 --- a/tests/v1/format/hostname.json +++ b/tests/v1/format/hostname.json @@ -101,12 +101,6 @@ "data": "hostname-", "valid": false }, - { - "description": "contains \"--\" in the 3rd and 4th position", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", - "data": "XN--aa---o47jg78q", - "valid": false - }, { "description": "contains underscore", "data": "host_name", @@ -355,6 +349,12 @@ "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", "data": "xn--ngba5hb2804a", "valid": true + }, + { + "description": "contains \"--\" in the 3rd and 4th position", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", + "data": "XN--aa---o47jg78q", + "valid": false } ] }