Skip to content

Commit

Permalink
Merge pull request #294 from Kuppit/main
Browse files Browse the repository at this point in the history
fix: use MODSEC_ARGUMENTS_LIMIT in SecRule for argument count limit
  • Loading branch information
fzipi authored Oct 9, 2024
2 parents 98f6986 + 85701d3 commit 1ef072c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/etc/modsecurity.d/modsecurity.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SecRule REQUEST_HEADERS:Content-Type "^(?:application(?:/soap\+|/)|text/)xml" \
"id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML"
SecRule REQUEST_HEADERS:Content-Type "^application/json" \
"id:'200001',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=JSON"
SecRule &ARGS "@ge 1000" \
SecRule &ARGS "@ge ${MODSEC_ARGUMENTS_LIMIT}" \
"id:'200007', phase:2,t:none,log,deny,status:400,msg:'Failed to fully parse request body due to large argument count',severity:2"
SecRule REQBODY_ERROR "!@eq 0" \
"id:'200002', phase:2,t:none,log,deny,status:400,msg:'Failed to parse request body.',logdata:'%{reqbody_error_msg}',severity:2"
Expand Down

0 comments on commit 1ef072c

Please sign in to comment.