mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Adds support to SecDefaultAction configuration directive
This commit is contained in:
14
src/rules.cc
14
src/rules.cc
@@ -208,6 +208,20 @@ int Rules::merge(Driver *from) {
|
||||
this->requestBodyLimitAction = from->requestBodyLimitAction;
|
||||
this->responseBodyLimitAction = from->responseBodyLimitAction;
|
||||
|
||||
/*
|
||||
*
|
||||
* default Actions is something per configuration context, there is
|
||||
* need to merge anything.
|
||||
*
|
||||
*/
|
||||
for (int i = 0; i < ModSecurity::Phases::NUMBER_OF_PHASES; i++) {
|
||||
std::vector<Action *> actions = from->defaultActions[i];
|
||||
this->defaultActions[i].clear();
|
||||
for (int j = 0; j < actions.size(); j++) {
|
||||
Action *action = actions[j];
|
||||
this->defaultActions[i].push_back(action);
|
||||
}
|
||||
}
|
||||
|
||||
if (from->audit_log != NULL && this->audit_log != NULL) {
|
||||
this->audit_log->refCountDecreaseAndCheck();
|
||||
|
Reference in New Issue
Block a user