mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 09:55:28 +03:00
Refactoring on the operators: negation is now being handled globally
Other minors changes were also made, including adding the prefix `m_' to all the members of the class.
This commit is contained in:
@@ -28,7 +28,7 @@ bool Eq::evaluate(Transaction *transaction, const std::string &input) {
|
||||
int p = 0;
|
||||
int i = 0;
|
||||
bool eq = false;
|
||||
std::string pt = MacroExpansion::expand(param, transaction);
|
||||
std::string pt = MacroExpansion::expand(m_param, transaction);
|
||||
|
||||
try {
|
||||
p = std::stoi(pt);
|
||||
@@ -43,10 +43,6 @@ bool Eq::evaluate(Transaction *transaction, const std::string &input) {
|
||||
|
||||
eq = p == i;
|
||||
|
||||
if (negation) {
|
||||
return !eq;
|
||||
}
|
||||
|
||||
return eq;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user