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
15 changes: 15 additions & 0 deletions tests/draft-next/optional/format/hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@
"description": "single dot",
"data": ".",
"valid": false
},
{
"description": "leading dot",
"data": ".example",
"valid": false
},
{
"description": "trailing dot",
"data": "example.",
"valid": false
},
{
"description": "IDN label separator",
"data": "example\uff0ecom",
"valid": false
}
]
}
Expand Down
80 changes: 80 additions & 0 deletions tests/draft-next/optional/format/idn-hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,86 @@
"description": "halfwidth ideographic full stop as label separator",
"data": "a\uff61b",
"valid": true
},
{
"description": "leading dot",
"data": ".example",
"valid": false
},
{
"description": "leading ideographic full stop",
"data": "\u3002example",
"valid": false
},
{
"description": "leading fullwidth full stop",
"data": "\uff0eexample",
"valid": false
},
{
"description": "leading halfwidth ideographic full stop",
"data": "\uff61example",
"valid": false
},
{
"description": "trailing dot",
"data": "example.",
"valid": false
},
{
"description": "trailing ideographic full stop",
"data": "example\u3002",
"valid": false
},
{
"description": "trailing fullwidth full stop",
"data": "example\uff0e",
"valid": false
},
{
"description": "trailing halfwidth ideographic full stop",
"data": "example\uff61",
"valid": false
},
{
"description": "dot separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
"valid": true
},
Comment on lines +427 to +431
Copy link
Member

Choose a reason for hiding this comment

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

I don't think these tests are right. Label length limits apply to the A-label length, not the U-label length. When I convert to ASCII I get, xn--hxaaaaaa3ababababababwdddddeeeeeegfffff2jggggg9ghhhhh3miiiiiljjjjj.com. The first label is 70 characters, which is already too long regardless of the separator.

I think this captures the intention of the test.

Suggested change
{
"description": "dot separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
"valid": true
},
{
"description": "dot separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα.com",
"valid": true
},

That way the label length is 60 (valid) if the dot is recognized as a separator and 64 (too long) if the dot is not recognized as a separator.

{
"description": "ideographic full stop separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
"valid": true
},
{
"description": "fullwidth full stop separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
"valid": true
},
{
"description": "halfwidth ideographic full stop separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
"valid": true
},
{
"description": "dot separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
"valid": false
},
Comment on lines +447 to +451
Copy link
Member

Choose a reason for hiding this comment

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

I don't think these tests have anything to do with separators. If the label is too long, it's going to fail regardless of the separator. I think these just amount to duplicates of label length tests that we already have.

{
"description": "ideographic full stop separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
"valid": false
},
{
"description": "fullwidth full stop separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
"valid": false
},
{
"description": "halfwidth ideographic full stop separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
"valid": false
}
]
}
Expand Down
15 changes: 15 additions & 0 deletions tests/draft2019-09/optional/format/hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@
"description": "single dot",
"data": ".",
"valid": false
},
{
"description": "leading dot",
"data": ".example",
"valid": false
},
{
"description": "trailing dot",
"data": "example.",
"valid": false
},
{
"description": "IDN label separator",
"data": "example\uff0ecom",
"valid": false
}
]
}
Expand Down
80 changes: 80 additions & 0 deletions tests/draft2019-09/optional/format/idn-hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@
},
{
"description": "validation of separators in internationalized host names",
"specification": [

Check notice on line 339 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 Expand Up @@ -383,6 +383,86 @@
"description": "halfwidth ideographic full stop as label separator",
"data": "a\uff61b",
"valid": true
},
{
"description": "leading dot",
"data": ".example",
"valid": false
},
{
"description": "leading ideographic full stop",
"data": "\u3002example",
"valid": false
},
{
"description": "leading fullwidth full stop",
"data": "\uff0eexample",
"valid": false
},
{
"description": "leading halfwidth ideographic full stop",
"data": "\uff61example",
"valid": false
},
{
"description": "trailing dot",
"data": "example.",
"valid": false
},
{
"description": "trailing ideographic full stop",
"data": "example\u3002",
"valid": false
},
{
"description": "trailing fullwidth full stop",
"data": "example\uff0e",
"valid": false
},
{
"description": "trailing halfwidth ideographic full stop",
"data": "example\uff61",
"valid": false
},
{
"description": "dot separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
"valid": true
},
{
"description": "ideographic full stop separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
"valid": true
},
{
"description": "fullwidth full stop separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
"valid": true
},
{
"description": "halfwidth ideographic full stop separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
"valid": true
},
{
"description": "dot separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
"valid": false
},
{
"description": "ideographic full stop separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
"valid": false
},
{
"description": "fullwidth full stop separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
"valid": false
},
{
"description": "halfwidth ideographic full stop separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
"valid": false
}
]
}
Expand Down
15 changes: 15 additions & 0 deletions tests/draft2020-12/optional/format/hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@
"description": "single dot",
"data": ".",
"valid": false
},
{
"description": "leading dot",
"data": ".example",
"valid": false
},
{
"description": "trailing dot",
"data": "example.",
"valid": false
},
{
"description": "IDN label separator",
"data": "example\uff0ecom",
"valid": false
}
]
}
Expand Down
80 changes: 80 additions & 0 deletions tests/draft2020-12/optional/format/idn-hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@
},
{
"description": "validation of separators in internationalized host names",
"specification": [

Check notice on line 339 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 Expand Up @@ -383,6 +383,86 @@
"description": "halfwidth ideographic full stop as label separator",
"data": "a\uff61b",
"valid": true
},
{
"description": "leading dot",
"data": ".example",
"valid": false
},
{
"description": "leading ideographic full stop",
"data": "\u3002example",
"valid": false
},
{
"description": "leading fullwidth full stop",
"data": "\uff0eexample",
"valid": false
},
{
"description": "leading halfwidth ideographic full stop",
"data": "\uff61example",
"valid": false
},
{
"description": "trailing dot",
"data": "example.",
"valid": false
},
{
"description": "trailing ideographic full stop",
"data": "example\u3002",
"valid": false
},
{
"description": "trailing fullwidth full stop",
"data": "example\uff0e",
"valid": false
},
{
"description": "trailing halfwidth ideographic full stop",
"data": "example\uff61",
"valid": false
},
{
"description": "dot separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
"valid": true
},
{
"description": "ideographic full stop separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
"valid": true
},
{
"description": "fullwidth full stop separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
"valid": true
},
{
"description": "halfwidth ideographic full stop separator with label that is too long when separator is ignored",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
"valid": true
},
{
"description": "dot separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα.com",
"valid": false
},
{
"description": "ideographic full stop separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\u3002com",
"valid": false
},
{
"description": "fullwidth full stop separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff0ecom",
"valid": false
},
{
"description": "halfwidth ideographic full stop separator with label that is too long when separator is respected",
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμα\uff61com",
"valid": false
}
]
}
Expand Down
15 changes: 15 additions & 0 deletions tests/draft4/optional/format/hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@
"description": "single dot",
"data": ".",
"valid": false
},
{
"description": "leading dot",
"data": ".example",
"valid": false
},
{
"description": "trailing dot",
"data": "example.",
"valid": false
},
{
"description": "IDN label separator",
"data": "example\uff0ecom",
"valid": false
}
]
}
Expand Down
15 changes: 15 additions & 0 deletions tests/draft6/optional/format/hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@
"description": "single dot",
"data": ".",
"valid": false
},
{
"description": "leading dot",
"data": ".example",
"valid": false
},
{
"description": "trailing dot",
"data": "example.",
"valid": false
},
{
"description": "IDN label separator",
"data": "example\uff0ecom",
"valid": false
}
]
}
Expand Down
15 changes: 15 additions & 0 deletions tests/draft7/optional/format/hostname.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@
"description": "single dot",
"data": ".",
"valid": false
},
{
"description": "leading dot",
"data": ".example",
"valid": false
},
{
"description": "trailing dot",
"data": "example.",
"valid": false
},
{
"description": "IDN label separator",
"data": "example\uff0ecom",
"valid": false
}
]
}
Expand Down
Loading
Loading