mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +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) {
|
||||
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))));
|
||||
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))));
|
||||
}
|
||||
|
||||
@ -461,20 +461,18 @@ std::list<std::pair<std::shared_ptr<std::string>,
|
||||
}
|
||||
|
||||
if (m_containsMultiMatchAction == true) {
|
||||
// v2 checks the last entry twice. Don't know why.
|
||||
ret.push_back(ret.back());
|
||||
|
||||
#ifndef NO_LOGS
|
||||
trans->debug(9, "multiMatch is enabled. " \
|
||||
+ std::to_string(ret.size()) + \
|
||||
" values to be tested.");
|
||||
#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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user