Skip to content

enforce 253 character limit in domain validator#461

Open
jmestwa-coder wants to merge 1 commit into
python-validators:masterfrom
jmestwa-coder:domain-max-length
Open

enforce 253 character limit in domain validator#461
jmestwa-coder wants to merge 1 commit into
python-validators:masterfrom
jmestwa-coder:domain-max-length

Conversation

@jmestwa-coder
Copy link
Copy Markdown

domain() bounds each label to 63 characters but never caps the overall name length, so a string of valid labels totalling more than 253 characters passes (issue #413, and hostname() inherits it through domain()). The presentation form of a domain name is limited to 253 characters per RFC 1035, so reject anything longer after idna encoding, excluding an optional trailing dot. email() already applies the same cap on its domain part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant