Refactoring: Makes transformations to work with new execute signature

This commit is contained in:
Felipe Zimmerle
2019-02-26 15:39:27 -03:00
parent 44c63d1048
commit 68f85628dd
93 changed files with 913 additions and 715 deletions

View File

@@ -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; }