mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 03:57:47 +03:00
Adds support to action CtlRuleRemoteTargetById
This commit is contained in:
16
src/rule.cc
16
src/rule.cc
@@ -357,6 +357,22 @@ bool Rule::evaluate(Transaction *trasn) {
|
||||
if (ignoreVariable) {
|
||||
continue;
|
||||
}
|
||||
for (auto &i : trasn->m_ruleRemoteTargetById) {
|
||||
int id = i.first;
|
||||
std::string args = i.second;
|
||||
if (rule_id != id) {
|
||||
continue;
|
||||
}
|
||||
if (args == v->m_key) {
|
||||
trasn->debug(9, "Variable: " + v->m_key +
|
||||
" was excluded by ruleRemoteTargetById...");
|
||||
ignoreVariable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ignoreVariable) {
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string value = v->m_value;
|
||||
int none = 0;
|
||||
|
Reference in New Issue
Block a user