Skip to content

More hostname label separator tests #776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
},
{
"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/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