Merge pull request #2789 from martinhsv/v2/master

Fix a failing test.
This commit is contained in:
martinhsv 2022-08-20 18:34:22 -04:00 committed by GitHub
commit ed60de97e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1353,15 +1353,14 @@
SecDebugLog $ENV{DEBUG_LOG} SecDebugLog $ENV{DEBUG_LOG}
SecDebugLogLevel 9 SecDebugLogLevel 9
SecRequestBodyAccess On SecRequestBodyAccess On
SecRule MULTIPART_STRICT_ERROR "\@eq 1" "phase:2,deny,id:500134" SecRule MULTIPART_STRICT_ERROR "\@eq 1" "phase:2,deny,status:400,id:500134"
SecRule MULTIPART_UNMATCHED_BOUNDARY "\@eq 1" "phase:2,deny,id:500135" SecRule REQBODY_PROCESSOR_ERROR "\@eq 1" "phase:2,deny,status:400,id:500136"
SecRule REQBODY_PROCESSOR_ERROR "\@eq 1" "phase:2,deny,id:500136"
), ),
match_log => { match_log => {
debug => [ qr/boundary was quoted.*No boundaries found in payload/s, 1 ], debug => [ qr/Multipart: Warning: boundary was quoted./s, 1 ],
}, },
match_response => { match_response => {
status => qr/^403$/, status => qr/^400$/,
}, },
request => new HTTP::Request( request => new HTTP::Request(
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
@ -1370,20 +1369,20 @@
], ],
normalize_raw_request_data( normalize_raw_request_data(
q( q(
--0000 -- 0000
Content-Disposition: form-data; name="name" Content-Disposition: form-data; name="name"
Brian Rectanus Brian Rectanus
--0000 -- 0000
Content-Disposition: form-data; name="email" Content-Disposition: form-data; name="email"
brian.rectanus@breach.com brian.rectanus@breach.com
--0000 -- 0000
Content-Disposition: form-data; name="image"; filename="image.jpg" Content-Disposition: form-data; name="image"; filename="image.jpg"
Content-Type: image/jpeg Content-Type: image/jpeg
BINARYDATA BINARYDATA
--0000-- -- 0000--
), ),
), ),
), ),