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

Go webserver terminates when receiving "malformed" requests #397

Open
anhtbnlpq9 opened this issue Nov 30, 2024 · 1 comment
Open

Go webserver terminates when receiving "malformed" requests #397

anhtbnlpq9 opened this issue Nov 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@anhtbnlpq9
Copy link

Hello,

I am running opengist inside a container. The container is alive as long the Go webserver is alive.
I have noticed my container stopping because the webserver has quit.
It seems that some malformed HTTP headers (or HTTP headers with missing information) would make the webserver to terminate, cf. the log I have:

Nov 15 18:58:28 my.host docker[737940]: Opengist
Nov 15 18:58:28 my.host docker[737940]: Using YAML config file: /home/opengist/config/config.yml
Nov 15 18:58:28 my.host docker[737940]: No environment variables config specified.
Nov 26 16:40:57 my.host docker[737940]: 16:40:57 FTL internal/web/server.go:228 error="code=400, message=missing csrf token in request header"
Nov 26 16:40:59 my.host systemd[1]: opengists.service: Main process exited, code=exited, status=1/FAILURE
Nov 26 16:40:59 my.host systemd[1]: opengists.service: Failed with result 'exit-code'.

I have not tried to reproduce the behaviour yet, and wasn't able to catch the HTTP request that made the webserver to terminate.

Thanks.

@realJoshByrnes
Copy link

Nov 26 16:40:57 my.host docker[737940]: 16:40:57 FTL internal/web/server.go:228 error="code=400, message=missing csrf token in request header"

This just means the Cross Site Request Forgery token is missing. You could try and do a HTTP POST without the token and see if it crashed.

@thomiceli thomiceli added the bug Something isn't working label Jan 20, 2025
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

3 participants