This repository was archived by the owner on May 14, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +44
-2
lines changed
util/regression-tests/tests/REQUEST-920-PROTOCOL-ENFORCEMENT Expand file tree Collapse file tree 2 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -949,7 +949,7 @@ SecRule REQUEST_HEADERS:Content-Type "@rx ^[^;\s]+" \
949949#
950950# Restrict charset parameter within the content-type header
951951#
952- SecRule REQUEST_HEADERS:Content-Type "@rx charset\s*=\s*([^;\s]+)" \
952+ SecRule REQUEST_HEADERS:Content-Type "@rx charset\s*=\s*[\"']? ([^;\"' \s]+)" \
953953 "id:920480,\
954954 phase:1,\
955955 block,\
Original file line number Diff line number Diff line change 191191 # Content-Type: "application/x-www-form-urlencoded;charset=ibm037;charset=UTF-8" #double charset may cause evasion
192192 # data: "test=value"
193193 # output:
194- # log_contains: "id \"920480\""
194+ # log_contains: "id \"920480\""
195+ - test_title : 920480-14
196+ stages :
197+ - stage :
198+ input :
199+ dest_addr : " 127.0.0.1"
200+ port : 80
201+ method : " POST"
202+ headers :
203+ User-Agent : " ModSecurity CRS 3 Tests"
204+ Host : " localhost"
205+ Content-Type : " application/x-www-form-urlencoded; charset=\" utf-8\" " # random other IBM charset
206+ data : " test=value"
207+ output :
208+ no_log_contains : " id \" 920480\" "
209+ - test_title : 920480-15
210+ stages :
211+ - stage :
212+ input :
213+ dest_addr : " 127.0.0.1"
214+ port : 80
215+ method : " POST"
216+ headers :
217+ User-Agent : " ModSecurity CRS 3 Tests"
218+ Host : " localhost"
219+ Content-Type : " application/x-www-form-urlencoded; charset='utf-8'" # random other IBM charset
220+ data : " test=value"
221+ output :
222+ no_log_contains : " id \" 920480\" "
223+ - test_title : 920480-16
224+ stages :
225+ - stage :
226+ input :
227+ dest_addr : " 127.0.0.1"
228+ port : 80
229+ method : " POST"
230+ headers :
231+ User-Agent : " ModSecurity CRS 3 Tests"
232+ Host : " localhost"
233+ Content-Type : " application/x-www-form-urlencoded; charset=\" garbage\" " # random other IBM charset
234+ data : " test=value"
235+ output :
236+ log_contains : " id \" 920480\" "
You can’t perform that action at this time.
0 commit comments