mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 03:57:47 +03:00
Forces disruptive to be first-rule-only
ModSecurity version 3 is capable to handle disruptive actions in different rules from the chain. However, lets get it working in the same fashion that we have in version 2.
This commit is contained in:
21
src/rule.cc
21
src/rule.cc
@@ -706,6 +706,27 @@ end_exec:
|
||||
}
|
||||
|
||||
|
||||
bool Rule::containsDisruptiveAction() {
|
||||
for (Action *a : m_actionsRuntimePos) {
|
||||
if (a->isDisruptive() == true) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (Action *a : m_actionsRuntimePre) {
|
||||
if (a->isDisruptive() == true) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (Action *a : m_actionsConf) {
|
||||
if (a->isDisruptive() == true) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
std::vector<actions::Action *> Rule::getActionsByName(const std::string& name) {
|
||||
std::vector<actions::Action *> ret;
|
||||
for (auto &z : m_actionsRuntimePos) {
|
||||
|
Reference in New Issue
Block a user