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

[Tailscale]: consider regex filtering for hostname validation/adjustments #2714

Closed
Hooverdan96 opened this issue Oct 19, 2023 · 1 comment · Fixed by #2719
Closed

[Tailscale]: consider regex filtering for hostname validation/adjustments #2714

Hooverdan96 opened this issue Oct 19, 2023 · 1 comment · Fixed by #2719
Assignees

Comments

@Hooverdan96
Copy link
Member

Follow up to the excellent initial pull request, regarding how hostnames are evaluated and adjusted in the corresponding python code.

          quick question, can a hostname not have unicode characters in it?  If that's the case, wouldn't some "inclusive" regex be better than excluding what we currently know as "special" characters"?

Originally posted by @Hooverdan96 in #2712 (comment)

@FroggyFlox FroggyFlox self-assigned this Oct 20, 2023
FroggyFlox added a commit to FroggyFlox/rockstor-core that referenced this issue Oct 20, 2023
The current mechanism uses a hard-coded list of characters to exclude
them from a custom tailscale hostname if present. This is rather ugly
and does not scale to all the characters (such as unicode) that need to
be excluded.

Switch to using regular expressions to exclude only characters from the
hostname that do not belong to that regular expression.
FroggyFlox added a commit that referenced this issue Oct 21, 2023
…x-filtering-for-hostname-validation

Use regular expressions to validate tailscale hostname #2714
@FroggyFlox
Copy link
Member

Closing as fixed by #2719.

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 a pull request may close this issue.

2 participants