Fix the `log' action and the webserver error callback

This commit is contained in:
Felipe Zimmerle
2016-07-16 15:20:31 -03:00
parent 8d9abfb46b
commit d781b00f70
6 changed files with 54 additions and 4 deletions

View File

@@ -18,16 +18,19 @@
#include <iostream>
#include <string>
#include "actions/action.h"
#include "modsecurity/transaction.h"
#include "src/utils.h"
#include "operators/operator.h"
namespace modsecurity {
namespace actions {
bool Log::evaluate(Rule *rule, Transaction *transaction) {
transaction->m_toBeSavedInAuditlogs = true;
/* FIXME: transaction->serverLog("Something...."); */
bool Log::evaluate(Rule *rule, Transaction *transaction, RuleMessage *rm) {
transaction->debug(9, "Saving transaction to logs");
rm->m_saveMessage = true;
return true;
}