Skip to content

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 <[email protected]>
@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