Using run time string on the operators

This commit is contained in:
Felipe Zimmerle
2018-01-22 18:05:02 -03:00
parent 6a97dbee7a
commit a299997e02
74 changed files with 6884 additions and 6111 deletions

View File

@@ -18,6 +18,7 @@
#include <string>
#include <memory>
#include <utility>
#include "src/operators/operator.h"
@@ -28,10 +29,8 @@ namespace operators {
class BeginsWith : public Operator {
public:
/** @ingroup ModSecurity_Operator */
BeginsWith(std::string op, std::string param, bool negation)
: Operator(op, param, negation) { }
explicit BeginsWith(std::string param)
: Operator("BeginsWith", param) { }
explicit BeginsWith(std::unique_ptr<RunTimeString> param)
: Operator("BeginsWith", std::move(param)) { }
bool evaluate(Transaction *transaction, Rule *rule, const std::string &str,
std::shared_ptr<RuleMessage> ruleMessage) override;