-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Hello!
First allow me to thank you for your work 👍 That crate has been really useful and very simple to use!
I am not exactly sure if it's actually a goal of the crate but I figured I might ask.
Should internationalized domain names be properly validated?
I was looking at test cases from https://github.com/json-schema-org/JSON-Schema-Test-Suite/blob/master/tests/draft7/optional/format/idn-hostname.json and it seems that some domain names are accepted whereas they should probably be rejected.
A few examples:
〮실례.테스트should be rejected because it contains a forbidden leading combining character
$ dig 〮실례.테스트
dig: '〮실례.테스트' is not a legal IDNA2008 name (string contains a forbidden leading combining character), use +noidnin
실〮례.테스트should be rejected because it contains a disallowed character
$ dig 실〮례.테스트
dig: '실〮례.테스트' is not a legal IDNA2008 name (string contains a disallowed character), use +noidnin
xn--Xshould be rejected because it contains invalid punycode data
$ dig xn--X
dig: 'xn--X' is not a legal IDNA2008 name (string contains invalid punycode data), use +noidnin
What do you think? Could the crate be enhanced to provide such domain validation? If not, do you recommend some alternatives?
Thank you for taking the time to read this.
rushmorem
Metadata
Metadata
Assignees
Labels
No labels