Skip to content

Validate Tailscale login URL scheme - #219

Merged
yuri91 merged 2 commits into
leaningtech:mainfrom
Nadav0077:fix/validate-tailscale-login-url
May 7, 2026
Merged

Validate Tailscale login URL scheme#219
yuri91 merged 2 commits into
leaningtech:mainfrom
Nadav0077:fix/validate-tailscale-login-url

Conversation

@Nadav0077

Copy link
Copy Markdown
Contributor

This fixes the custom Tailscale/Headscale login flow so returned auth URLs must be normal http(s) URLs before WebVM navigates the login popup to them.

A malicious custom control server should not be able to return a scriptable URL such as javascript: and have it execute in the WebVM origin.

validation happens when the login URL is received, before it reaches either the popup navigation or the sidebar link. If validation fails, the login popup is closed and the UI shows an invalid login URL state.

I validated this locally:

  • javascript: login URL is rejected
  • popup closes and does not expose localStorage
  • normal https login URL still works for me
  • npm run build succeeds

Nadav0077 added 2 commits May 7, 2026 11:05
Signed-off-by: Nadav0077 <18245584+Nadav0077@users.noreply.github.com>
Signed-off-by: Nadav0077 <18245584+Nadav0077@users.noreply.github.com>

@yuri91 yuri91 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me. Thank you for this!

@yuri91
yuri91 merged commit 513bff9 into leaningtech:main May 7, 2026
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.

2 participants