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

fix:[#377] allow digits in hostname #380

Merged
merged 1 commit into from
Mar 7, 2025
Merged

Conversation

jardon
Copy link
Member

@jardon jardon commented Mar 7, 2025

Update the regex to allow for digits in the hostname validation.

closes #377

@jardon jardon requested a review from taukakao March 7, 2025 19:12
@jardon jardon marked this pull request as draft March 7, 2025 19:23
@jardon jardon force-pushed the fix/hostname-validation branch from 452157d to 1b63e67 Compare March 7, 2025 19:24
@jardon jardon changed the title fix:[#377] allow digits and dashes in hostname fix:[#377] allow digits in hostname Mar 7, 2025
@jardon jardon marked this pull request as ready for review March 7, 2025 19:25
Copy link
Member

@taukakao taukakao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems correct, yeah. I read that a hostname can't start with a digit and didn't want to complicate it too much but as it turns out it can now.

Quoting Wikipedia:
The original specification of hostnames in RFC 952, mandated that labels could not start with a digit or with a hyphen, and must not end with a hyphen. However, a subsequent specification (RFC 1123) permitted hostname labels to start with digits.

@jardon jardon merged commit 51f55ea into main Mar 7, 2025
3 checks passed
@jardon jardon deleted the fix/hostname-validation branch March 7, 2025 23:13
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.

Wrong hostname verification
3 participants