mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Support configurable limit on depth of JSON parsing
This commit is contained in:
@@ -830,6 +830,9 @@ int Transaction::processRequestBody() {
|
||||
if (m_requestBodyProcessor == JSONRequestBody) {
|
||||
#endif
|
||||
std::string error;
|
||||
if (m_rules->m_requestBodyJsonDepthLimit.m_set) {
|
||||
m_json->setMaxDepth(m_rules->m_requestBodyJsonDepthLimit.m_value);
|
||||
}
|
||||
if (m_json->init() == true) {
|
||||
m_json->processChunk(m_requestBody.str().c_str(),
|
||||
m_requestBody.str().size(),
|
||||
|
Reference in New Issue
Block a user