mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Adds macro expansion for all operators
This commit is contained in:
@@ -18,13 +18,15 @@
|
||||
#include <string>
|
||||
|
||||
#include "operators/operator.h"
|
||||
#include "src/macro_expansion.h"
|
||||
|
||||
namespace ModSecurity {
|
||||
namespace operators {
|
||||
|
||||
|
||||
bool StrMatch::evaluate(Assay *assay, const std::string &input) {
|
||||
bool ret = input.find(param) != std::string::npos;
|
||||
std::string p = MacroExpansion::expand(param, assay);
|
||||
bool ret = input.find(p) != std::string::npos;
|
||||
|
||||
if (negation) {
|
||||
return !ret;
|
||||
|
Reference in New Issue
Block a user