whatwg / url

URL Standard
https://url.spec.whatwg.org/
Other
527 stars 137 forks source link

CheckHyphens isn't set to beStrict #820

Open hsivonen opened 7 months ago

hsivonen commented 7 months ago

What is the issue with the URL Standard?

https://url.spec.whatwg.org/#concept-domain-to-ascii has a beStrict flag to validation. This flag affects the UseSTD3ASCIIRules and VerifyDnsLength flags for UTS 46 processing, but don't affect the CheckHyphens flag. AFAICT, STD3 conformance requires setting all three to true, because UseSTD3ASCIIRules enables a non-positional deny list, but CheckHyphens also denies the hyphen as the first or last character of a label.

To the extent validation tries to check for STD3 conformance, it's strange not to also set CheckHyphens to beStrict.