mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Allow 0 length JSON requests. 0 len XML and multipart already allowed.
This commit is contained in:
parent
9b6d4b2bb9
commit
f15976f68f
2
CHANGES
2
CHANGES
@ -1,6 +1,8 @@
|
||||
DD MMM YYYY - 2.9.3 - To be released
|
||||
------------------------------------
|
||||
|
||||
* Allow 0 length JSON requests.
|
||||
[Issue #1822 - @allanbomsft, @zimmerle, @victorhora, @marcstern]
|
||||
* Include unanmed JSON values in unnamed ARGS
|
||||
[Issue #1577, #1576 - @marcstern, @victorhora, @zimmerle]
|
||||
* Fix buffer size for utf8toUnicode transformation
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user