mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 16:06:12 +03:00
Fix multimatch behavior to match what we have on v2
This commit is contained in:
parent
11ebd17b9d
commit
0961760c71
16
src/rule.cc
16
src/rule.cc
@ -396,10 +396,10 @@ std::list<std::pair<std::shared_ptr<std::string>,
|
|||||||
|
|
||||||
if (m_containsMultiMatchAction == true) {
|
if (m_containsMultiMatchAction == true) {
|
||||||
ret.push_back(std::make_pair(
|
ret.push_back(std::make_pair(
|
||||||
std::shared_ptr<std::string>(value),
|
std::shared_ptr<std::string>(new std::string(*value)),
|
||||||
std::shared_ptr<std::string>(new std::string(path))));
|
std::shared_ptr<std::string>(new std::string(path))));
|
||||||
ret.push_back(std::make_pair(
|
ret.push_back(std::make_pair(
|
||||||
std::shared_ptr<std::string>(value),
|
std::shared_ptr<std::string>(new std::string(*value)),
|
||||||
std::shared_ptr<std::string>(new std::string(path))));
|
std::shared_ptr<std::string>(new std::string(path))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -461,20 +461,18 @@ std::list<std::pair<std::shared_ptr<std::string>,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_containsMultiMatchAction == true) {
|
if (m_containsMultiMatchAction == true) {
|
||||||
// v2 checks the last entry twice. Don't know why.
|
|
||||||
ret.push_back(ret.back());
|
|
||||||
|
|
||||||
#ifndef NO_LOGS
|
#ifndef NO_LOGS
|
||||||
trans->debug(9, "multiMatch is enabled. " \
|
trans->debug(9, "multiMatch is enabled. " \
|
||||||
+ std::to_string(ret.size()) + \
|
+ std::to_string(ret.size()) + \
|
||||||
" values to be tested.");
|
" values to be tested.");
|
||||||
#endif
|
#endif
|
||||||
} else {
|
|
||||||
ret.push_back(std::make_pair(
|
|
||||||
value,
|
|
||||||
std::shared_ptr<std::string>(new std::string(path))));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret.push_back(std::make_pair(
|
||||||
|
std::shared_ptr<std::string>(new std::string(*value)),
|
||||||
|
std::shared_ptr<std::string>(new std::string(path))));
|
||||||
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user