mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
fix negated implicit @rx operator
When an operator starts with '!' and no explicit operator is specified, a negated @rx operator should be created. Due to a bug, a regular @rx operator with regex starting with '!' was created. This commit fixes it
This commit is contained in:
committed by
Felipe Zimmerle
parent
ca9cbf4ddc
commit
039bd2cc84
@@ -853,7 +853,7 @@ op:
|
||||
}
|
||||
| NOT OPERATOR_RX_CONTENT_ONLY
|
||||
{
|
||||
OPERATOR_CONTAINER($$, new operators::Rx("!" + utils::string::removeBracketsIfNeeded($2)));
|
||||
OPERATOR_CONTAINER($$, new operators::Rx("Rx", utils::string::removeBracketsIfNeeded($2), true));
|
||||
std::string error;
|
||||
if ($$->init(driver.ref.back(), &error) == false) {
|
||||
driver.error(@0, error);
|
||||
|
Reference in New Issue
Block a user