mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Refactoring: how to report to error logs
This commit is contained in:
@@ -67,7 +67,6 @@ class Action {
|
||||
}
|
||||
virtual bool init(std::string *error) { return true; }
|
||||
virtual bool isDisruptive() { return false; }
|
||||
virtual void fillIntervention(ModSecurityIntervention *intervention);
|
||||
static Action *instantiate(const std::string& name);
|
||||
|
||||
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#ifndef HEADERS_MODSECURITY_RULE_MESSAGE_H_
|
||||
@@ -50,6 +51,7 @@ class RuleMessage {
|
||||
{ }
|
||||
|
||||
std::string errorLog(Transaction *trans);
|
||||
std::string disruptiveErrorLog(Transaction *trans, std::string log2);
|
||||
|
||||
|
||||
std::string m_match;
|
||||
@@ -65,7 +67,6 @@ class RuleMessage {
|
||||
int m_accuracy;
|
||||
|
||||
std::list<std::string> m_tags;
|
||||
std::vector<actions::Action *> m_tmp_actions;
|
||||
std::list<std::string> m_server_logs;
|
||||
|
||||
Rule *m_rule;
|
||||
|
@@ -73,8 +73,10 @@ class Rules;
|
||||
class RuleMessage;
|
||||
namespace actions {
|
||||
class Action;
|
||||
namespace disruptive {
|
||||
enum AllowType : int;
|
||||
}
|
||||
}
|
||||
namespace RequestBodyProcessor {
|
||||
class XML;
|
||||
class JSON;
|
||||
@@ -339,7 +341,7 @@ class Transaction {
|
||||
/**
|
||||
* If allow action was utilized, this variable holds the allow type.
|
||||
*/
|
||||
modsecurity::actions::AllowType m_allowType;
|
||||
modsecurity::actions::disruptive::AllowType m_allowType;
|
||||
|
||||
/**
|
||||
* Holds the decode URI. Notice that m_uri holds the raw version
|
||||
@@ -351,7 +353,8 @@ class Transaction {
|
||||
* Actions (disruptive?) that should be taken by the connector related to
|
||||
* that transaction.
|
||||
*/
|
||||
std::vector<actions::Action *> m_actions;
|
||||
std::vector<ModSecurityIntervention> m_actions;
|
||||
ModSecurityIntervention m_it;
|
||||
|
||||
/**
|
||||
* Holds the creation time stamp, using std::time.
|
||||
|
Reference in New Issue
Block a user