mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 03:57:47 +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:
@@ -26,7 +26,7 @@ namespace operators {
|
||||
|
||||
bool Within::evaluate(Transaction *transaction, const std::string &str) {
|
||||
bool res = false;
|
||||
std::string paramTarget = MacroExpansion::expand(param, transaction);
|
||||
std::string paramTarget = MacroExpansion::expand(m_param, transaction);
|
||||
|
||||
if (str.empty()) {
|
||||
return true;
|
||||
@@ -34,11 +34,6 @@ bool Within::evaluate(Transaction *transaction, const std::string &str) {
|
||||
|
||||
res = paramTarget.find(str) != std::string::npos;
|
||||
|
||||
|
||||
if (negation) {
|
||||
return !res;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user