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

blink1-tiny-server doesn't return any response when html is disabled and an invalid url is requested #72

Open
normanr opened this issue Mar 7, 2024 · 1 comment

Comments

@normanr
Copy link
Contributor

normanr commented Mar 7, 2024

If blink1-tiny-server is started with --no-html and an unrecognized uri is requested (eg: /404), then the requests is never completed.

Note that echoing the requested uri back to the client (like was done before version 2.3.0) could open up an XSS, so either don't echo the uri back in the response, or ensure that it is appropriately encoded and that correct http response header (Content-type: application/json? X-Content-Type-Options: nosniff?) is set to ensure that browsers interpret the response as json.

todbot added a commit that referenced this issue Mar 8, 2024
- handle unknown URIs in /blink/*
- explicitly set headers content-type application/json and x-content-type-options nosniff
- remove potential XSS vector of echoing uri in JSON response
- removed list of URIs in /blink1 status message as it created bad json
@todbot
Copy link
Owner

todbot commented Mar 8, 2024

Thanks! These are great suggestions

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

No branches or pull requests

2 participants