Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Lack of support for PATCH method #358

Closed
scottybrisbane opened this issue Mar 7, 2017 · 1 comment · Fixed by #426
Closed

Lack of support for PATCH method #358

scottybrisbane opened this issue Mar 7, 2017 · 1 comment · Fixed by #426

Comments

@scottybrisbane
Copy link

scottybrisbane commented Mar 7, 2017

Despite the official statement that "Naxsi filters only GET and POST requests" I have been able to perform a basic experiment observing that PUT and DELETE (as well as HEAD and OPTIONS) are filtered as expected. PATCH seems to be an exception though, and isn't filtered based on its body contents. Is this something that can be fixed?

In more detail, I modified the hex encoding rule to be MainRule "str:0x" "msg:0x, possible hex encoding" "mz:RAW_BODY|BODY|URL|ARGS|$HEADERS_VAR:Cookie" "s:DROP" id:1002; and removed a majority of the other rules. I then issued the following request: curl --request PATCH -d '{"test":"0x"}' localhost and saw Naxsi allow the request to pass to the backend. The request curl --request PATCH -d '{"test":"abc"}' localhost/0x was correctly blocked however, indicating there is some basic support for the PATCH method.

@buixor
Copy link
Contributor

buixor commented Mar 23, 2017

Yes, that sounds like a good idea :)

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

Successfully merging a pull request may close this issue.

2 participants