mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
21
src/rule.cc
21
src/rule.cc
@@ -527,4 +527,25 @@ bool Rule::evaluate(Transaction *trasn) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
std::vector<actions::Action *> Rule::getActionsByName(const std::string& name) {
|
||||
std::vector<actions::Action *> ret;
|
||||
for (auto &z : this->actions_runtime_pos) {
|
||||
if (z->m_name == name) {
|
||||
ret.push_back(z);
|
||||
}
|
||||
}
|
||||
for (auto &z : this->actions_runtime_pre) {
|
||||
if (z->m_name == name) {
|
||||
ret.push_back(z);
|
||||
}
|
||||
}
|
||||
for (auto &z : this->actions_conf) {
|
||||
if (z->m_name == name) {
|
||||
ret.push_back(z);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace modsecurity
|
||||
|
Reference in New Issue
Block a user