mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 09:31:53 +03:00
Refactoring: Makes transformations to work with new execute signature
This commit is contained in:
@@ -39,6 +39,7 @@ namespace actions {
|
||||
|
||||
class Action {
|
||||
public:
|
||||
|
||||
explicit Action(const std::string& _action)
|
||||
: m_isNone(false),
|
||||
temporaryAction(false),
|
||||
@@ -81,6 +82,17 @@ class Action {
|
||||
RuleMessage &ruleMessage) {
|
||||
return execute(rule, transaction);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is meant to be used by transformations — a particular
|
||||
* type of action.
|
||||
*
|
||||
*/
|
||||
virtual void execute(Transaction *t,
|
||||
ModSecStackString &in,
|
||||
ModSecStackString &out) {
|
||||
};
|
||||
|
||||
virtual bool init(std::string *error) { return true; }
|
||||
virtual bool isDisruptive() { return false; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user