mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Fix argument key-value pair parsing cases
This commit is contained in:
committed by
Felipe Zimmerle
parent
68c995ca98
commit
9cac167faf
@@ -294,17 +294,9 @@ bool Transaction::extractArguments(const std::string &orig,
|
||||
|
||||
std::string key;
|
||||
std::string value;
|
||||
std::vector<std::string> key_value = utils::string::ssplit(t, sep2);
|
||||
for (auto& a : key_value) {
|
||||
if (i == 0) {
|
||||
key = a;
|
||||
} else if (i == 1) {
|
||||
value = a;
|
||||
} else {
|
||||
value = value + "=" + a;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
std::pair<std::string, std::string> key_value_pair = utils::string::ssplit_pair(t, sep2);
|
||||
key = key_value_pair.first;
|
||||
value = key_value_pair.second;
|
||||
|
||||
key_s = (key.length() + 1);
|
||||
value_s = (value.length() + 1);
|
||||
|
Reference in New Issue
Block a user