Skip to content

Relax validServerHostname to accept -- or ..#50386

Merged
tigrato merged 6 commits intomasterfrom
tigrato/relax-server-hostname-validation
Dec 18, 2024
Merged

Relax validServerHostname to accept -- or ..#50386
tigrato merged 6 commits intomasterfrom
tigrato/relax-server-hostname-validation

Conversation

@tigrato
Copy link
Copy Markdown
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 <tiago.silva@goteleport.com>
Comment thread lib/auth/auth.go Outdated
Comment thread lib/auth/auth.go Outdated
Comment thread lib/auth/auth.go Outdated
Comment thread lib/auth/auth.go Outdated
tigrato and others added 2 commits December 18, 2024 18:16
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
@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
@tigrato tigrato deleted the tigrato/relax-server-hostname-validation branch December 18, 2024 23:08
@public-teleport-github-review-bot
Copy link
Copy Markdown

@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 <tiago.silva@goteleport.com>

* 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 <edoardo.spadolini@goteleport.com>

* handle review comments

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
carloscastrojumo pushed a commit to carloscastrojumo/teleport that referenced this pull request Feb 19, 2025
* 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 <tiago.silva@goteleport.com>

* 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 <edoardo.spadolini@goteleport.com>

* handle review comments

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
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