mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 10:20:35 +03:00
General improvements on audit logs information
Making actions: msg, logdata, tag and others to work in the same fashion that they work on ModSecurity v2.x
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "modsecurity/transaction.h"
|
||||
#include "src/utils.h"
|
||||
#include "src/macro_expansion.h"
|
||||
#include "modsecurity/rule.h"
|
||||
|
||||
namespace modsecurity {
|
||||
namespace actions {
|
||||
@@ -35,14 +36,11 @@ LogData::LogData(std::string action)
|
||||
|
||||
|
||||
bool LogData::evaluate(Rule *rule, Transaction *transaction) {
|
||||
std::string msg = MacroExpansion::expand(m_data, transaction);
|
||||
#ifndef NO_LOGS
|
||||
transaction->debug(9, "Saving msg: " + msg);
|
||||
#endif
|
||||
transaction->m_rulesMessages.push_back(msg);
|
||||
transaction->serverLog(msg);
|
||||
return true;
|
||||
std::string data = MacroExpansion::expand(m_data, transaction);
|
||||
|
||||
rule->m_log_data = data;
|
||||
}
|
||||
|
||||
|
||||
} // namespace actions
|
||||
} // namespace modsecurity
|
||||
|
||||
Reference in New Issue
Block a user