mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Allow 0 length JSON requests. 0 len XML and multipart already allowed.
This commit is contained in:
committed by
Felipe Zimmerle
parent
9b6d4b2bb9
commit
f15976f68f
@@ -710,7 +710,7 @@ apr_status_t modsecurity_request_body_end(modsec_rec *msr, char **error_msg) {
|
||||
}
|
||||
else if (strcmp(msr->msc_reqbody_processor, "JSON") == 0) {
|
||||
#ifdef WITH_YAJL
|
||||
if (json_complete(msr, &my_error_msg) < 0) {
|
||||
if (json_complete(msr, &my_error_msg) < 0 && msr->msc_reqbody_length > 0) {
|
||||
*error_msg = apr_psprintf(msr->mp, "JSON parser error: %s", my_error_msg);
|
||||
msr->msc_reqbody_error = 1;
|
||||
msr->msc_reqbody_error_msg = *error_msg;
|
||||
|
Reference in New Issue
Block a user