mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Fix the `log' action and the webserver error callback
This commit is contained in:
@@ -282,6 +282,7 @@ bool Rule::evaluate(Transaction *trasn) {
|
||||
}
|
||||
|
||||
ruleMessage = new modsecurity::RuleMessage(this, m_log_message);
|
||||
|
||||
#ifndef NO_LOGS
|
||||
std::string eparam = MacroExpansion::expand(this->op->param, trasn);
|
||||
|
||||
@@ -533,6 +534,10 @@ bool Rule::evaluate(Transaction *trasn) {
|
||||
}
|
||||
}
|
||||
|
||||
if (ruleMessage->m_saveMessage == true) {
|
||||
trasn->serverLog(ruleMessage->errorLog(trasn));
|
||||
}
|
||||
|
||||
if ((!m_log_message.empty() || !m_log_data.empty())
|
||||
&& !ruleMessage->m_match.empty()) {
|
||||
ruleMessage->m_data = m_log_data;
|
||||
|
Reference in New Issue
Block a user