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

Relax validServerHostname to accept -- or .. #50386

Merged
merged 6 commits into from
Dec 18, 2024

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Dec 18, 2024

This PR updates the regex used by validServerHostname to permit consecutive symbols (- and .) in server hostnames.

Changelog: Enable multiple consecutive occurrences of - and . in SSH server hostnames.

This PR updates the regex used by `validServerHostname` to permit consecutive symbols (`-` and `.`) in server hostnames.

Changelog: Enable multiple consecutive occurrences of `-` and `.` in SSH server hostnames.

Signed-off-by: Tiago Silva <[email protected]>
lib/auth/auth.go Outdated Show resolved Hide resolved
lib/auth/auth.go Outdated Show resolved Hide resolved
lib/auth/auth.go Outdated Show resolved Hide resolved
lib/auth/auth.go Outdated Show resolved Hide resolved
@tigrato tigrato added this pull request to the merge queue Dec 18, 2024
@tigrato tigrato mentioned this pull request Dec 18, 2024
Merged via the queue into master with commit e135f9f Dec 18, 2024
41 checks passed
@tigrato tigrato deleted the tigrato/relax-server-hostname-validation branch December 18, 2024 23:08
@public-teleport-github-review-bot

@tigrato See the table below for backport results.

Branch Result
branch/v17 Create PR

mvbrock pushed a commit that referenced this pull request Dec 19, 2024
* Relax `validServerHostname` to accept `--` or `..`

This PR updates the regex used by `validServerHostname` to permit consecutive symbols (`-` and `.`) in server hostnames.

Changelog: Enable multiple consecutive occurrences of `-` and `.` in SSH server hostnames.

Signed-off-by: Tiago Silva <[email protected]>

* revert to old hostname if it was valid under the new rules

* fix

* run test in parallel

* Update lib/auth/auth.go

Co-authored-by: Edoardo Spadolini <[email protected]>

* handle review comments

---------

Signed-off-by: Tiago Silva <[email protected]>
Co-authored-by: Edoardo Spadolini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants