mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Fix rule-update-target exclusions for plain (non-regex) variables
This commit is contained in:
committed by
Felipe Zimmerle
parent
f7e4c1d9f5
commit
1b1fdc055b
@@ -610,14 +610,14 @@ class Variables : public std::vector<Variable *> {
|
||||
return std::find_if(begin(), end(),
|
||||
[v](Variable *m) -> bool { return *v == *m; }) != end();
|
||||
};
|
||||
bool contains(const std::string &v) {
|
||||
bool contains(const VariableValue *v) {
|
||||
return std::find_if(begin(), end(),
|
||||
[v](Variable *m) -> bool {
|
||||
VariableRegex *r = dynamic_cast<VariableRegex *>(m);
|
||||
if (r) {
|
||||
return r->m_r.searchAll(v).size() > 0;
|
||||
return r->m_r.searchAll(v->getKey()).size() > 0;
|
||||
}
|
||||
return v == *m->m_fullName.get();
|
||||
return v->getKeyWithCollection() == *m->m_fullName.get();
|
||||
}) != end();
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user