mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Adds support to SecRuleRemoveByMsg
This commit is contained in:
11
src/rule.cc
11
src/rule.cc
@@ -850,4 +850,15 @@ bool Rule::containsTag(const std::string& name, Transaction *t) {
|
||||
}
|
||||
|
||||
|
||||
bool Rule::containsMsg(const std::string& name, Transaction *t) {
|
||||
for (auto &z : this->m_actionsRuntimePos) {
|
||||
actions::Msg *msg = dynamic_cast<actions::Msg *> (z);
|
||||
if (msg != NULL && msg->data(t) == name) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
} // namespace modsecurity
|
||||
|
Reference in New Issue
Block a user