-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
/socket.io
is POST
ed with content-type: text/plain
and trips ModSecurity OWASP
rules
#4256
Comments
Interesting though in an earlier version before i updated this worked fine, so i wonder if something in the code has changed to cause this regression? |
Technically:
We are not guaranteed that Uptime Kuma could be working on a special setup, so I changed it to Also the request is made by Socket.io, which unlikely can be fixed in our code base:
If you think it is a bug, you should transfer the issue to their repo with a minimal socket.io reproduce steps. |
Note that this is our supported nginx configuration: https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy#nginx If there are good reasons for including it in our configuration we can discuss this but currently I don't see them. Note that the ruleset you are using is kind of infamous for the amount of false positives as far as I have read |
I've currently workedarounded it by adding an exception to just that request path for now. |
/socket.io
is POST
ed with content-type: text/plain
and trips ModSecurity OWASP
rules
I am going to close this issue as I don't see how we can fix it on our side. |
🛡️ Security Policy
Description
Whenever the dashboards establishes a websocket connection it does it with content-type: text/plain which trips ModSec since it should avoid using that content-type since it will prevent processing of the data to inspect it properly.
I haven't checked yet what content is returned in the POST to propose a proper type but the authors might have a better idea.
👟 Reproduction steps
Install Uptime Kuma
Put it behind NGINX Reverse Proxy with ModSecurity and OWASP ruleset enabled.
👀 Expected behavior
Uptime Kuma works fine without any tweaks
😓 Actual Behavior
It errors on establishing websockets and returns a link to enable WebSockets support in the reverse proxy that is already enabled.
🐻 Uptime-Kuma Version
1.23.10
💻 Operating System and Arch
Debian 12 x86_64
🌐 Browser
Google Chrome and tested on Firefox aswell to rule out cookies/cache issues
🐋 Docker Version
No response
🟩 NodeJS Version
No response
📝 Relevant log output
The text was updated successfully, but these errors were encountered: