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,17 +65,16 @@ bool SetVar::init(std::string *error) {
|
|||||||
m_variableName = std::string(m_parser_payload, pos + 1,
|
m_variableName = std::string(m_parser_payload, pos + 1,
|
||||||
pos2 - (pos + 1));
|
pos2 - (pos + 1));
|
||||||
if (pos2 + 2 > m_parser_payload.length()) {
|
if (pos2 + 2 > m_parser_payload.length()) {
|
||||||
error->assign("Something wrong with the input format");
|
m_predicate = "";
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_operation == setOperation) {
|
|
||||||
m_predicate = std::string(m_parser_payload, pos2 + 1,
|
|
||||||
m_parser_payload.length() - (pos2));
|
|
||||||
} else {
|
} else {
|
||||||
m_predicate = std::string(m_parser_payload, pos2 + 2,
|
if (m_operation == setOperation) {
|
||||||
m_parser_payload.length()
|
m_predicate = std::string(m_parser_payload, pos2 + 1,
|
||||||
- (pos2 + 1));
|
m_parser_payload.length() - (pos2));
|
||||||
|
} else {
|
||||||
|
m_predicate = std::string(m_parser_payload, pos2 + 2,
|
||||||
|
m_parser_payload.length()
|
||||||
|
- (pos2 + 1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user