Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions tests/draft2019-09/optional/format/idn-hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,36 @@
"description": "empty string",
"data": "",
"valid": false
},
{
"description": "Bidi domain name with a digit-first label is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2 a label in a Bidi domain name must start with an L, R or AL character",
"data": "0a.\u05d0",
"valid": false
},
Comment on lines +335 to +340

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one isn't correct. The bidi rules apply per label. This example includes two labels, "0A" and "\u05d0". The first is unambiguously LTR and the second is unambiguously RTL. Both are valid labels. If you remove the ".", it becomes a single label and would violate rule 1 as intended.

{
"description": "label starting with a digit before a right-to-left letter is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "0\u0627",
"valid": false
},
{
"description": "left-to-right label containing a right-to-left letter is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "a\u05d0",
"valid": false
},
{
"description": "right-to-left label mixing both digit types is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "\u05d00\u0660",
"valid": false
}
]
},
{
"description": "validation of separators in internationalized host names",
"specification": [

Check notice on line 363 in tests/draft2019-09/optional/format/idn-hostname.json

View workflow job for this annotation

GitHub Actions / annotate

Specification Link

https://www.rfc-editor.org/rfc/rfc3490.html#section-3.1
{"rfc3490": "3.1", "quote": "Whenever dots are used as label separators, the following characters MUST be recognized as dots: U+002E (full stop), U+3002 (ideographic full stop), U+FF0E (fullwidth full stop), U+FF61(halfwidth ideographic full stop)"}
],
"schema": {
Expand Down
24 changes: 24 additions & 0 deletions tests/draft2020-12/optional/format/idn-hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,36 @@
"description": "empty string",
"data": "",
"valid": false
},
{
"description": "Bidi domain name with a digit-first label is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2 a label in a Bidi domain name must start with an L, R or AL character",
"data": "0a.\u05d0",
"valid": false
},
{
"description": "label starting with a digit before a right-to-left letter is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "0\u0627",
"valid": false
},
{
"description": "left-to-right label containing a right-to-left letter is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "a\u05d0",
"valid": false
},
{
"description": "right-to-left label mixing both digit types is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "\u05d00\u0660",
"valid": false
}
]
},
{
"description": "validation of separators in internationalized host names",
"specification": [

Check notice on line 363 in tests/draft2020-12/optional/format/idn-hostname.json

View workflow job for this annotation

GitHub Actions / annotate

Specification Link

https://www.rfc-editor.org/rfc/rfc3490.html#section-3.1
{"rfc3490": "3.1", "quote": "Whenever dots are used as label separators, the following characters MUST be recognized as dots: U+002E (full stop), U+3002 (ideographic full stop), U+FF0E (fullwidth full stop), U+FF61(halfwidth ideographic full stop)"}
],
"schema": {
Expand Down
24 changes: 24 additions & 0 deletions tests/draft7/optional/format/idn-hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,36 @@
"description": "empty string",
"data": "",
"valid": false
},
{
"description": "Bidi domain name with a digit-first label is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2 a label in a Bidi domain name must start with an L, R or AL character",
"data": "0a.\u05d0",
"valid": false
},
{
"description": "label starting with a digit before a right-to-left letter is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "0\u0627",
"valid": false
},
{
"description": "left-to-right label containing a right-to-left letter is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "a\u05d0",
"valid": false
},
{
"description": "right-to-left label mixing both digit types is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "\u05d00\u0660",
"valid": false
}
]
},
{
"description": "validation of separators in internationalized host names",
"specification": [

Check notice on line 355 in tests/draft7/optional/format/idn-hostname.json

View workflow job for this annotation

GitHub Actions / annotate

Specification Link

https://www.rfc-editor.org/rfc/rfc3490.html#section-3.1
{"rfc3490": "3.1", "quote": "Whenever dots are used as label separators, the following characters MUST be recognized as dots: U+002E (full stop), U+3002 (ideographic full stop), U+FF0E (fullwidth full stop), U+FF61(halfwidth ideographic full stop)"}
],
"schema": { "format": "idn-hostname" },
Expand Down
24 changes: 24 additions & 0 deletions tests/v1/format/idn-hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,30 @@
"description": "empty string",
"data": "",
"valid": false
},
{
"description": "Bidi domain name with a digit-first label is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2 a label in a Bidi domain name must start with an L, R or AL character",
"data": "0a.\u05d0",
"valid": false
},
{
"description": "label starting with a digit before a right-to-left letter is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "0\u0627",
"valid": false
},
{
"description": "left-to-right label containing a right-to-left letter is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "a\u05d0",
"valid": false
},
{
"description": "right-to-left label mixing both digit types is invalid",
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2",
"data": "\u05d00\u0660",
"valid": false
}
]
},
Expand Down
Loading