-
Notifications
You must be signed in to change notification settings - Fork 13
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
Crowdsec reCAPTCHA remediation : http2 requests are not supported yet #44
Comments
This is not us, this is the lua http module for NGINX does not support http 2. We are kind of helpless to this. Seems the error you shown above is not directly http2. Within the proxy pass do you downgrade to http 1.1? |
Hello, Thanks for your answer, sorry I've been told on Discord to post my issue here.
AFAIK, I don't, but I'm not an expert on Nginx, barely an enthousiast homelabber. default.conf :
proxy headers embedded :
There is indeed a line Finally, my crowdsec reverse proxy file :
I need captcha because of some false positives on crowdsec bans. |
I am getting the same error as well and using SWAG for proxy |
I have opened a ticket at linuxserver since I am assuming this issue has something to do with SWAG. In case someone needs to follow the issue progress: linuxserver/docker-mods#772 |
running into the same issue. Is it possible to roll back to http 1.1 when captcha remidation is detected ? neither my lua nor nginx internals knowledge is good enough to answer that by myself ;) |
No, as it changes how the http server works. The only other way would be to set up a different subdomain on a different nginx install that is http 1 only, and all other servers redirect to that sever to which the webserver on the captcha domain redirects back to a query parameter after a valid solve. Or once our NJS bouncer is out that could be an alternative 🤷🏻 However, this limitation is nginx lua integration itself not ours so we have no control over this. |
Hey all finally found sometime to look why my nginx is okay and SWAG seems to be affected? It seems this PR fixed it https://github.com/openresty/lua-nginx-module/pull/2237/files that is the request has a content length it will be accept as http2 I am using a compiled version from ubuntu which was before the PR that added the unsupported flag. If the lua code is bumped up to latest it should start working again. |
Right now I'm having still having the issue.
I'm newbie, but from what I read, the PR has been merged, the lua module is in 0.10.26 version right now, while SWAG is still running the 0.10.24 version. So maybe that's the reason the issue persists ? |
Yes alpine repositories have not been updated to I never had the issue because im on ubuntu and they dropped support so I never got the updated code to fix http2 issue they saw, however, they now merged in a new fix to allow http2 requests with a content-length header |
Hello, I've yesterday tried a bit around with Captchas/AppSec, and it works ... if the request uses HTTP/1 (1.0 or 1.1), with HTTP/2 and HTTP/3 request my log is spammed (two examples from DoH requests, the error also appears when opening a site in Firefox/chromium):
I get an 500 error with all clients: DoH (IOS native, Adguardhome, cloudflared, etc.), curl, Firefox and chromium, if I disable HTTP/2 and HTTP/3 it works without problems. |
The problem we have there is no way in current nginx lua to ask if there is a body and the way they intend for you to do it call the function which they added the log spam on and check if nil was returned. However, within the new implementation its throw an error of just returning nil. We could wrap it around a try, catch because in your example I guess they didnt have any body cause they are GET requests |
In my short test this error only occurred with HEAD and GET requests, but I don't know if there was even a POST request made which could throw this error |
Most likely those two request types would throw this error as they dont have a |
yes |
Just adding a note for anyone who comes here: You MUST be using nginx-http-mod-lua version If you are on this version and still encounter issues please open a new issue with information need to replicate |
upgraded swag yesterday to latest, image: ghcr.io/linuxserver/swag |
Yes as stated the maintainer of lua nginx on alpine said they would back port it, however, it still doesnt seem like they have 😟 |
Hello,
I've set up Crowdsec to use captcha remediation instead of ban for some collections, especially LePresidente/Emby.
On a banned IP, as soon as the captcha is resolved, I got an error 500 in the browser.
In the nginx (SWAG Linuxserver) error.log I get this error :
I tried to :
If I switch back to ban remediation, everything runs smoothly.
Here is my setup :
profiles.yaml (crowdsec) : https://pastebin.com/ftcdgtwT
crowdsec-nginx-bouncer.conf :
I don't know if I'm doing something wrong, any help appreciated.
The text was updated successfully, but these errors were encountered: