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

different or incorrect logging when request is blocked because of invalid content-type #232

Open
pasikarkkainen opened this issue Oct 18, 2016 · 2 comments
Assignees
Milestone

Comments

@pasikarkkainen
Copy link

Sending HTTP GET request thru lua-resty-waf reverse proxy with an invalid content-type:
curl -H "Content-Type:foobar" "http://reverseproxy.domain.tld/lua-resty-waf/index.html"

.. causes the request to be blocked with HTTP 403 Forbidden, which is a correct action to do.

But in this case openresty debug error.log doesn't have the usual JSON string of why the request was blocked, because lua-resty-waf doesn't actually see this as matching a rule, because it just calls ngx.exit(ngx.HTTP_FORBIDDEN) inside of resty.waf.request.lua.

As discussed on IRC this should be fixed.

@p0pr0ck5 p0pr0ck5 self-assigned this Oct 18, 2016
@p0pr0ck5
Copy link
Owner

Look into tying this into CRSv3 translation/setvar interface

@p0pr0ck5 p0pr0ck5 added this to the v0.9 milestone Oct 18, 2016
@p0pr0ck5 p0pr0ck5 removed this from the v0.9 milestone Jan 25, 2017
@p0pr0ck5
Copy link
Owner

See note in #239. Targeting v0.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants