Adds full support to the libxml action

Issue #1148
This commit is contained in:
Felipe Zimmerle
2016-05-18 09:47:30 -03:00
parent a9e6716c6a
commit 1f45d6cea8
7 changed files with 124 additions and 32 deletions

View File

@@ -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