Skip to content
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

Allow single label hostname in format string #1164

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

swaeberle
Copy link
Contributor

@swaeberle swaeberle commented Sep 15, 2023

When validating hostname format strings with module fqdn, only FQDNs were accepted, as the minimum label length of the FQDN class is 2. Therefore, single label hostnames like "localhost" were rejected.

Fixed this by validating with a minimum label length of 1.


📚 Documentation preview 📚: https://python-jsonschema--1164.org.readthedocs.build/en/1164/

When validating hostname format strings with module fqdn, only FQDNs
were accepted, as the minimum label length of the FQDN class is 2.
Therefore, single label hostnames like "localhost" were rejected.

Fixed this by validating with a minimum label length of 1.

Signed-off-by: Stephan Wurm <stephan.wurm@a-eberle.de>
@swaeberle swaeberle temporarily deployed to PyPI September 15, 2023 12:07 — with GitHub Actions Inactive
@Julian Julian merged commit 047ac37 into python-jsonschema:main Sep 20, 2023
@Julian
Copy link
Member

Julian commented Sep 20, 2023

Merged, really appreciated! Will be released shortly.

@swaeberle swaeberle deleted the fix/format-hostname branch September 21, 2023 05:27
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.

Hostname format check does not allow single labels
2 participants