Postponing the decision to whenever save or not a log message to the last rule

Whenever there is a chained rule, the decision of saving a message on the
webserver's log will be taken after the execution of all actions on the chain,
including the default actions.
This commit is contained in:
Felipe Zimmerle 2017-03-29 14:51:32 -03:00
parent 4d03ef512e
commit c7053e572f
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -697,7 +697,7 @@ end_clean:
end_exec:
executeActionsAfterFullMatch(trans, containsDisruptive, ruleMessage);
if (this->m_chained == false && ruleMessage->m_saveMessage != false) {
if (m_ruleId != 0 && ruleMessage->m_saveMessage != false) {
trans->serverLog(ruleMessage);
trans->m_rulesMessages.push_back(*ruleMessage);
}