mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Adds partial support to UpdateActionById
This commit is contained in:
@@ -81,7 +81,7 @@ int Driver::addSecRule(Rule *rule) {
|
||||
if (lastRule->m_chainedRule == NULL) {
|
||||
rule->m_phase = lastRule->m_phase;
|
||||
lastRule->m_chainedRule = rule;
|
||||
if (rule->containsDisruptiveAction()) {
|
||||
if (rule->containsStaticDisruptiveAction()) {
|
||||
m_parserError << "Disruptive actions can only be specified by";
|
||||
m_parserError << " chain starter rules.";
|
||||
return false;
|
||||
@@ -94,7 +94,7 @@ int Driver::addSecRule(Rule *rule) {
|
||||
}
|
||||
if (a->m_chained && a->m_chainedRule == NULL) {
|
||||
a->m_chainedRule = rule;
|
||||
if (a->containsDisruptiveAction()) {
|
||||
if (a->containsStaticDisruptiveAction()) {
|
||||
m_parserError << "Disruptive actions can only be ";
|
||||
m_parserError << "specified by chain starter rules.";
|
||||
return false;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1513,12 +1513,16 @@ expression:
|
||||
}
|
||||
|
||||
|
||||
std::vector<actions::Action *> *a = new std::vector<actions::Action *>();
|
||||
for (auto &i : *$2.get()) {
|
||||
a->push_back(i.release());
|
||||
if (driver.m_exceptions.loadUpdateActionById(ruleId, std::move($2), &error) == false) {
|
||||
std::stringstream ss;
|
||||
ss << "SecRuleUpdateActionById: failed to load:";
|
||||
ss << $1;
|
||||
ss << ". ";
|
||||
ss << error;
|
||||
driver.error(@0, ss.str());
|
||||
YYERROR;
|
||||
}
|
||||
|
||||
driver.error(@0, "SecRuleUpdateActionById is not yet supported");
|
||||
YYERROR;
|
||||
}
|
||||
/* Debug log: start */
|
||||
|
Reference in New Issue
Block a user