mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Support configurable limit on number of arguments processed
This commit is contained in:
committed by
Felipe Zimmerle
parent
4e9ba44d03
commit
f57265a3e2
@@ -389,6 +389,12 @@ bool Transaction::addArgument(const std::string& orig, const std::string& key,
|
||||
ms_dbg(4, "Adding request argument (" + orig + "): name \"" + \
|
||||
key + "\", value \"" + value + "\"");
|
||||
|
||||
if (m_rules->m_argumentsLimit.m_set
|
||||
&& m_variableArgs.size() >= m_rules->m_argumentsLimit.m_value) {
|
||||
ms_dbg(4, "Skipping request argument, over limit (" + std::to_string(m_rules->m_argumentsLimit.m_value) + ")")
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t k_offset = offset;
|
||||
offset = offset + key.size() + 1;
|
||||
m_variableArgs.set(key, value, offset);
|
||||
|
Reference in New Issue
Block a user