Merge pull request #1714 from p0pr0ck5/sanitize-json

This commit is contained in:
Victor Hora 2018-11-12 19:45:38 -05:00 committed by GitHub
commit 1adea9f1e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@
#ifdef WITH_YAJL
char *base_offset=NULL;
const char *base_offset=NULL;
int json_add_argument(modsec_rec *msr, const char *value, unsigned length)
{

View File

@ -1749,7 +1749,7 @@ void sec_audit_logger_native(modsec_rec *msr) {
for(i = 0; i < tarr->nelts; i++) {
msc_arg *arg = (msc_arg *)telts[i].val;
if (arg->origin != NULL &&
strcmp(arg->origin, "BODY") != 0)
( strcmp(arg->origin, "BODY") != 0 && strcmp(arg->origin, "JSON") != 0) )
continue;
if (last_offset == 0) { /* The first time we're here. */