mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 02:10:36 +03:00
Adds macro expansion for all operators
This commit is contained in:
@@ -17,14 +17,17 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "src/macro_expansion.h"
|
||||
|
||||
namespace ModSecurity {
|
||||
namespace operators {
|
||||
|
||||
bool Contains::evaluate(Assay *assay, const std::string &input) {
|
||||
bool contains = input.find(param) != std::string::npos;
|
||||
std::string p = MacroExpansion::expand(param, assay);
|
||||
bool contains = input.find(p) != std::string::npos;
|
||||
|
||||
if (contains) {
|
||||
matched.push_back(param);
|
||||
matched.push_back(p);
|
||||
}
|
||||
|
||||
if (negation) {
|
||||
|
||||
Reference in New Issue
Block a user