mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Using run time string on the operators
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
#define SRC_OPERATORS_STR_MATCH_H_
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "src/operators/operator.h"
|
||||
|
||||
@@ -27,10 +29,10 @@ namespace operators {
|
||||
class StrMatch : public Operator {
|
||||
public:
|
||||
/** @ingroup ModSecurity_Operator */
|
||||
StrMatch(std::string op, std::string param, bool negation)
|
||||
: Operator(op, param, negation) { }
|
||||
explicit StrMatch(std::string param)
|
||||
: Operator("StrMatch", param) { }
|
||||
explicit StrMatch(std::unique_ptr<RunTimeString> param)
|
||||
: Operator("StrMatch", std::move(param)) {
|
||||
m_couldContainsMacro = true;
|
||||
}
|
||||
|
||||
bool evaluate(Transaction *transaction, const std::string &input) override;
|
||||
};
|
||||
|
Reference in New Issue
Block a user