mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Adds "negation" property to the operators signature
This commit is contained in:
parent
2f3a8f0880
commit
f41f9e1f0d
@ -64,9 +64,6 @@
|
||||
namespace ModSecurity {
|
||||
namespace operators {
|
||||
|
||||
Operator::Operator() {
|
||||
}
|
||||
|
||||
|
||||
bool Operator::debug(Assay *assay, int x, std::string a) {
|
||||
assay->debug(x, a);
|
||||
@ -74,12 +71,6 @@ bool Operator::debug(Assay *assay, int x, std::string a) {
|
||||
}
|
||||
|
||||
|
||||
Operator::Operator(std::string op, std::string param, bool negation) {
|
||||
this->op = op;
|
||||
this->param = param;
|
||||
}
|
||||
|
||||
|
||||
bool Operator::evaluate(Assay *assay) {
|
||||
if (assay) {
|
||||
assay->debug(2, "Operator: " + this->op + \
|
||||
|
@ -29,11 +29,16 @@ namespace operators {
|
||||
class Operator {
|
||||
public:
|
||||
/** @ingroup ModSecurity_Operator */
|
||||
Operator();
|
||||
Operator(std::string po, std::string param, bool invert);
|
||||
Operator() { }
|
||||
Operator(std::string op, std::string param, bool negation)
|
||||
: op(op),
|
||||
param(param),
|
||||
negation(negation) { }
|
||||
|
||||
|
||||
std::string op;
|
||||
std::string param;
|
||||
bool negation;
|
||||
|
||||
virtual bool evaluate(Assay *assay);
|
||||
virtual bool evaluate(Assay *assay, const std::string &str);
|
||||
|
Loading…
x
Reference in New Issue
Block a user