mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Refactoring on the variable read/store methods
Now it is ready to received two (or more) variables with same key.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <list>
|
||||
|
||||
#include "operators/operator.h"
|
||||
#include "actions/action.h"
|
||||
@@ -120,8 +121,12 @@ bool Rule::evaluate(Assay *assay) {
|
||||
} else {
|
||||
bool ret = false;
|
||||
try {
|
||||
ret = this->op->evaluate(assay,
|
||||
assay->m_variables_strings.at(variable.name));
|
||||
std::list<std::string> e = assay->resolve_variable(
|
||||
variable.name);
|
||||
for (std::string value : e) {
|
||||
ret = this->op->evaluate(assay,
|
||||
value);
|
||||
}
|
||||
} catch (...) {
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user