-
Notifications
You must be signed in to change notification settings - Fork 11
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
RFC1035 and RFC1912 are incompatible #22
Comments
https://tools.ietf.org/html/rfc1912
Good news with this, we found a source where underscores are allowed in hostnames, even if it is voluntary only |
I think This then raises the underscore question of is |
hmm. and i even own Internet host names with labels that are entirely digits. oops. however the original use case for this module was to validate what could get a TLS cert signed by a CA, and they don’t accept underscores. I suppose we could shift away from regex entirely and reimplement rules by using sets and lengths. here’s the rulesets i see right now:
the question of what should be the default is painful because of the 2 label minimum and the original focus on internet hostnames for CAs. if we could actually nail this down properly, i’d be happy to implement one final minor version supporting python 2.7 that focuses on backwards compatibility (internet hostnames for CAs), and then do a major version bump with a better default (closer to Chromium or RFC1123) and drop python2 support. Maybe the major version bump should also break the api in true python3 fashion so as to ensure anyone who upgrades blindly ends up needed to adjust their code or downgrade. I’m really against breaking changes but I think my original read of the requirements was quite bad. |
I see I also put in another restriction that suits Internet hostnames: that the root label (TLD) cannot be only digits. That one came from RFC 3696 s2 which isn’t authoritative, but it seems for this use case. RFC 2181 is the latest and is authoritative. It also describes another use case which is purely for DNS, where the only restrictions are label length and total length, and the label chars can be any binary data, unrestricted. Perhaps the new api should also implement this. |
I think we we kept the I think you could then add a couple new properties, |
yeah, there doesn’t seem to be a real world use case where rfc1033 (without rfc1123’s relaxation) is practical. |
#24 i think resolves this, just going back to the original format of accepting digits. |
As with the original task for the underscore change, the world is not compliant the removal of allowing numbers at the beginning of hostnames has exploded alot of my URLs.
Need the capability to allow hostnames to begin with digits.
The text was updated successfully, but these errors were encountered: