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

Adding pre-auth keys does not work. #38

Closed
apollo13 opened this issue Mar 3, 2023 · 5 comments
Closed

Adding pre-auth keys does not work. #38

apollo13 opened this issue Mar 3, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@apollo13
Copy link

apollo13 commented Mar 3, 2023

When I try to add a pre-auth key an empty window pops up and nothing happens:
image

The js console & server logs show no issues.

@iFargle
Copy link
Owner

iFargle commented Mar 4, 2023

Same issue. I'll get it fixed shortly!

@iFargle iFargle added the bug Something isn't working label Mar 4, 2023
@iFargle iFargle self-assigned this Mar 4, 2023
iFargle added a commit that referenced this issue Mar 4, 2023
@iFargle
Copy link
Owner

iFargle commented Mar 4, 2023

Fixed :) thanks for pointing this out!

@iFargle iFargle closed this as completed Mar 4, 2023
@apollo13
Copy link
Author

apollo13 commented Mar 4, 2023

Hi @iFargle, thank you for the fix. I see that you are using + operations to concat strings to construct HTML. An attacker can use this to inject other HTML or Javascript (consider someone setting a user_name to <b>apollo13</b> which would show up as bold). Granted the username per se is a bad example because headscale itself might forbid such usernames. Nevertheless, why open yourself for a potential vulnerability in a security sensitive UI. If you were to use Jinja for templating with escaping enabled you'd at least fix 90% of such issues.

@iFargle
Copy link
Owner

iFargle commented Mar 5, 2023

Interesting...
I'm very new to programming. I'll take all the help I can get! I'll look into this. If I can figure it out I'll push some fixes. Thank you!

@apollo13
Copy link
Author

apollo13 commented Mar 5, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants