Re: Rule "GET or HEAD Request with Body Content." is catching a "POST" method

Christian Varas <[email protected]>
Newsgroups gmane.comp.apache.mod-security.user
Message-ID <[email protected]>
Thanks  Ervin,

I didin't note the size of Content-Lenght, for sure this is not a normal
request :P

Cheers.

El 22-04-19 a las 17:10, Ervin Hegedüs escribió:
> Hi Christian,
>
> On Mon, Apr 22, 2019 at 04:22:27PM -0300, Christian Varas wrote:
>> Hello, i'm having a small issue with modsecurity and nginx
>>
>> I'm getting the following blocking with the rule "GET or HEAD Request
>> with Body Content."
>>
>> The thing is that this rule is catching a wrong method.
>>
>> I'm sending this POST with a normal body content
> I think this isn't a "normal" request :)
>
>> *POST* /informacion-general-de-bomberos HTTP/1.1
>> Host: www.bomberos.cl
>> Content-Length: 33480
> ^^^^^^^^^^^^^^^^^^^^^^^
>
>> Cache-Control: max-age=0
> ...
>
>> Connection: close
> the body starts here:
>
>> ------WebKitFormBoundary85SDZfedhQBpvDB6
>> Content-Disposition: form-data; name="q"
>>
>> #
>> ------WebKitFormBoundary85SDZfedhQBpvDB6
>> Content-Disposition: form-data; name="option"
>>
>> com_contenido
>> ------WebKitFormBoundary85SDZfedhQBpvDB6
>> Content-Disposition: form-data; name="Itemid"
>>
>> 647
>> ------WebKitFormBoundary85SDZfedhQBpvDB6
>> Content-Disposition: form-data; name="task"
>>
>> buscarContenido
>> ------WebKitFormBoundary85SDZfedhQBpvDB6--
> the length of the bidy is 424 char (plus the CR characters at the
> end of the lines, they are 17 - so 424+17 = 441).
>  
>> "headers":{"Accept":"text/html...", ... ,"Content-Length":"441"
>> "components":["OWASP_CRS/3.1.0\""**]*},"messages":[{"message":"GET or HEAD Request with Body Content.","details":{"match":"Matched \"Operator `Rx' with parameter `^0?$' against variable `REQUEST_HEADERS:Content-Length' (Value: `441')",
> I think the Nginx waits a 33480 length body, but only got 441 - I
> assume that this is a unique Nginx behavior....
>
> I've tried your request, only replaced the Content-Length to 424,
> and everything worked well.
>
> Hope this helps.
>
>
> a.
>
>
> _______________________________________________
> mod-security-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mod-security-users
> Commercial ModSecurity Rules and Support from Trustwave's SpiderLabs:
> http://www.modsecurity.org/projects/commercial/rules/
> http://www.modsecurity.org/projects/commercial/support/

-- 

Chris

_______________________________________________
mod-security-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mod-security-users
Commercial ModSecurity Rules and Support from Trustwave's SpiderLabs:
http://www.modsecurity.org/projects/commercial/rules/
http://www.modsecurity.org/projects/commercial/support/
pEpkey.asc (application/pgp-keys, 3.1 KB)
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBFvbV84BEACzsqs6dSJgB3Q/DaQs99P5GLxjM9gF02gsAIzJeFC4RwJ6wcji
wMuWYo+eLzg2asbUOJZ60ed2O64+jtFEBVEsho92KXU5ioLc+9tP5lW+m8mS/FI9
ZPvfMsv+brp68LjunTMeJwwnK34hAiTrQSc0taZq6nFDJwkn04DhCL//cm29uepU
hYAorv6cjo8g+ZbBeOY3fk1SsqzsnENyN+o6rwVGOlifEOj1Ys90StvjNNlEoxp6
7tNRnp++I0mx9G/VtWZZcg/XGwf1GBdmtA/uIBJyiZljsaaNzV76zkPzJk5TKO8M
ASRReH4a6h90exxKddzXWURfy0DtB9AxU2hQRnRzaf8U0xcE0p6UQNW8WWLiphnJ
FQjCrwSkHYDlXAt8MpNwNKVE8PWT8faF7ND5c6ptZZySW2O/RR48dzUgLiqtI8SK
gqsftsPh1MOZHJrm1+g+VzfLwkH4f4v7aXRaMRJWdvYN5j2vjGvjlTp+fPN87aa+
FZ4NZLW8nTOQa38ba8x1NfKS/N1ytlLECRxmgXRwg4B+AwBOCvzyi50PzXGfGq79
UABGt3RGDFe3IvNo8F7xBXcBEqhpPHlQx16TBnCbX1/cz6xl3Kgu49qblhcfx6/2
ReL1DeYXig01Sc1OABwIPrd1QvRBgVKvtbjpgHdQTyyIvlR5twy0l/uTuQARAQAB
tCFDaHJpc3RpYW4gVmFyYXMgPGN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C5u6O81300/yD1xm0z7Zr2ASpaRILkaEaF5heBJvGDgyS0BA
8thHHPKBv+Nj5DRLFZJGtuJNONQe5W3T8R+1IwRSMwgZSSKRMsf1iDQqSEJ1hLXB
ueffTQ+94pYest+ui5EdlAe/30URQSFzrQIxoAy7jbxo/IvGAnOLgN/5wz7pyiJ5
GZNokvLk6b5A
=ZAfD
-----END PGP PUBLIC KEY BLOCK-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.