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,6 +18,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "operators/operator.h"
|
||||
#include "src/macro_expansion.h"
|
||||
|
||||
namespace ModSecurity {
|
||||
namespace operators {
|
||||
@@ -25,9 +26,11 @@ namespace operators {
|
||||
|
||||
bool EndsWith::evaluate(Assay *assay, const std::string &input) {
|
||||
bool ret = false;
|
||||
if (input.length() >= param.length()) {
|
||||
ret = (0 == input.compare(input.length() - param.length(),
|
||||
param.length(), param));
|
||||
std::string p = MacroExpansion::expand(param, assay);
|
||||
|
||||
if (input.length() >= p.length()) {
|
||||
ret = (0 == input.compare(input.length() - p.length(),
|
||||
p.length(), p));
|
||||
}
|
||||
|
||||
if (negation) {
|
||||
|
Reference in New Issue
Block a user