mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 18:05:28 +03:00
Adds macro expansion for all operators
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "operators/operator.h"
|
||||
#include "src/macro_expansion.h"
|
||||
|
||||
namespace ModSecurity {
|
||||
namespace operators {
|
||||
@@ -27,9 +28,10 @@ bool Eq::evaluate(Assay *assay, const std::string &input) {
|
||||
int p = 0;
|
||||
int i = 0;
|
||||
bool eq = false;
|
||||
std::string pt = MacroExpansion::expand(param, assay);
|
||||
|
||||
try {
|
||||
p = std::stoi(param);
|
||||
p = std::stoi(pt);
|
||||
} catch (...) {
|
||||
p = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user