Skip to content

Commit e803cdd

Browse files
author
Marc Stern
committed
Merge branch 'v2/master' of https://github.com/marcstern/ModSecurity into v2/master
2 parents c7c7881 + 30c909c commit e803cdd

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
DD mmm YYYY - 2.9.x (to be released)
22
-------------------
33

4+
* Enhance logging
5+
[Issue #3107 - @marcstern]
46
* Fix possible segfault in collection_unpack
57
[Issue #3072 - @twouters]
68
* Set the minimum security protocol version for SecRemoteRules

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
ModSecurity for Apache 2.x
2-
======
1+
# ModSecurity 2
32

4-
http://www.modsecurity.org/
3+
https://www.modsecurity.org/
54

6-
Copyright (c) 2004-2013 Trustwave Holdings, Inc. (http://www.trustwave.com/)
5+
Copyright (c) 2004-2024 Trustwave Holdings, Inc. (https://www.trustwave.com/)
6+
Copyright (c) 2024-2024 OWASP ModSecurity Project (https://www.owasp.org/)
77

88
You may not use this file except in compliance with the License. You may obtain a copy of the License at: https://www.apache.org/licenses/LICENSE-2.0
99

10-
If any of the files related to licensing are missing or if you have any other questions related to licensing please contact Trustwave Holdings, Inc. directly using the email address: modsecurity@owasp.org.
11-
10+
If any of the files related to licensing are missing or if you have any other questions related to licensing please contact us here: modsecurity@owasp.org.
1211

1312
## Documentation
1413

1514
Please refer to: [the documentation folder](https://github.com/owasp-modsecurity/ModSecurity/tree/v2/master/doc) for the reference manual.
1615

1716
## Sponsor Note
1817

19-
Development of ModSecurity is sponsored by Trustwave. Sponsorship will end July 1, 2024. Additional information can be found here https://www.trustwave.com/en-us/resources/security-resources/software-updates/end-of-sale-and-trustwave-support-for-modsecurity-web-application-firewall/
18+
Original Development of ModSecurity was sponsored by Trustwave. In 2024, [stewardship was transferred to OWASP](https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/trustwave-transfers-modsecurity-custodianship-to-the-open-worldwide-application-security-project/).
19+
20+
Contact us for sponsorship!
21+
22+
You can also send us donations using the [OWASP donations page](https://owasp.org/donate/?reponame=www-project-modsecurity&title=OWASP+ModSecurity).

apache2/msc_json.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ int json_add_argument(modsec_rec *msr, const char *value, unsigned length)
6565
log_escape_ex(msr->mp, arg->value, arg->value_len));
6666
}
6767
msr->msc_reqbody_error = 1;
68+
msr->json->yajl_error = apr_psprintf(msr->mp, "More than %ld JSON keys", msr->txcfg->arguments_limit);
6869
return 0;
6970
}
7071

@@ -374,9 +375,12 @@ int json_process_chunk(modsec_rec *msr, const char *buf, unsigned int size, char
374375
if (msr->json->depth_limit_exceeded) {
375376
*error_msg = "JSON depth limit exceeded";
376377
} else {
377-
char *yajl_err = yajl_get_error(msr->json->handle, 0, buf, size);
378-
*error_msg = apr_pstrdup(msr->mp, yajl_err);
379-
yajl_free_error(msr->json->handle, yajl_err);
378+
if (msr->json->yajl_error) *error_msg = msr->json->yajl_error;
379+
else {
380+
char* yajl_err = yajl_get_error(msr->json->handle, 0, buf, size);
381+
*error_msg = apr_pstrdup(msr->mp, yajl_err);
382+
yajl_free_error(msr->json->handle, yajl_err);
383+
}
380384
}
381385
return -1;
382386
}

0 commit comments

Comments
 (0)