mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Fix setvar action to accept equals nothing
This commit is contained in:
parent
cf2ffe7e11
commit
0fdde52532
@ -65,10 +65,8 @@ bool SetVar::init(std::string *error) {
|
||||
m_variableName = std::string(m_parser_payload, pos + 1,
|
||||
pos2 - (pos + 1));
|
||||
if (pos2 + 2 > m_parser_payload.length()) {
|
||||
error->assign("Something wrong with the input format");
|
||||
return false;
|
||||
}
|
||||
|
||||
m_predicate = "";
|
||||
} else {
|
||||
if (m_operation == setOperation) {
|
||||
m_predicate = std::string(m_parser_payload, pos2 + 1,
|
||||
m_parser_payload.length() - (pos2));
|
||||
@ -78,6 +76,7 @@ bool SetVar::init(std::string *error) {
|
||||
- (pos2 + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_collectionName.empty() || m_variableName.empty()) {
|
||||
error->assign("Something wrong with the input format");
|
||||
|
Loading…
x
Reference in New Issue
Block a user