mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-02 04:27: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:
@@ -24,15 +24,11 @@ namespace modsecurity {
|
||||
namespace operators {
|
||||
|
||||
bool Ge::evaluate(Transaction *transaction, const std::string &input) {
|
||||
std::string p = MacroExpansion::expand(param, transaction);
|
||||
std::string p = MacroExpansion::expand(m_param, transaction);
|
||||
std::string i = MacroExpansion::expand(input, transaction);
|
||||
|
||||
bool ge = atoll(i.c_str()) >= atoll(p.c_str());
|
||||
|
||||
if (negation) {
|
||||
return !ge;
|
||||
}
|
||||
|
||||
return ge;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user