mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
Support configurable limit on depth of JSON parsing
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
#include "modsecurity/rules_set.h"
|
||||
|
||||
|
||||
|
||||
namespace modsecurity {
|
||||
namespace RequestBodyProcessor {
|
||||
|
||||
@@ -104,12 +103,19 @@ class JSON {
|
||||
return ret;
|
||||
}
|
||||
|
||||
void setMaxDepth(double max_depth) {
|
||||
m_max_depth = max_depth;
|
||||
}
|
||||
|
||||
private:
|
||||
std::deque<JSONContainer *> m_containers;
|
||||
Transaction *m_transaction;
|
||||
yajl_handle m_handle;
|
||||
yajl_status m_status;
|
||||
std::string m_current_key;
|
||||
double m_max_depth;
|
||||
int64_t m_current_depth;
|
||||
bool m_depth_limit_exceeded;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user