@@ -90,6 +90,8 @@ SecRule REQUEST_LINE "!@rx ^(?i:(?:[a-z]{3,10}\s+(?:\w{3,7}?://[\w\-\./]*(?::\d+
9090# 920121: PL2 : FILES_NAMES, FILES
9191#                ['\";=] : ' " ; = meta-characters
9292#
93+ # Not supported by re2 (?<!re).
94+ #
9395# -=[ References ]=-
9496# https://www.owasp.org/index.php/ModSecurity_CRS_RuleID-960000
9597# http://www.ietf.org/rfc/rfc2183.txt
@@ -400,6 +402,8 @@ SecRule REQUEST_HEADERS:Connection "@rx \b(?:keep-alive|close),\s?(?:keep-alive|
400402# different variables - REQUEST_URI and REQUEST_BODY.   For REQUEST_BODY, we only want to
401403# run the @validateUrlEncoding operator if the content-type is application/x-www-form-urlencoding.
402404#
405+ # Not supported by re2 (?!re).
406+ #
403407# -=[ References ]=-
404408# http://www.ietf.org/rfc/rfc1738.txt
405409#
@@ -427,6 +431,8 @@ SecRule REQUEST_URI "@rx \%(?:(?!$|\W)|[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})" \
427431        setvar:'tx.anomaly_score_pl1=+%{tx.warning_anomaly_score}',\
428432        setvar:'tx.%{rule.id}-OWASP_CRS/PROTOCOL_VIOLATION/EVASION-%{MATCHED_VAR_NAME}=%{MATCHED_VAR}'"
429433
434+ # Not supported by re2 (?!re).
435+ #
430436SecRule REQUEST_HEADERS:Content-Type "@rx ^(?:application\/x-www-form-urlencoded|text\/xml)(?:;(?:\s?charset\s?=\s?[\w\d\-]{1,18})?)??$" \
431437    "id:920240,\
432438    phase:2,\
@@ -1230,6 +1236,8 @@ SecRule REQUEST_BASENAME "@endsWith .pdf" \
12301236        setvar:'tx.%{rule.id}-OWASP_CRS/PROTOCOL_VIOLATION/INVALID_HREQ-%{MATCHED_VAR_NAME}=%{MATCHED_VAR}'"
12311237
12321238
1239+ # Not supported by re2 (?!re).
1240+ #
12331241SecRule ARGS "@rx \%((?!$|\W)|[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})" \
12341242    "id:920230,\
12351243    phase:2,\
@@ -1520,6 +1528,8 @@ SecRule REQUEST_HEADERS|!REQUEST_HEADERS:User-Agent|!REQUEST_HEADERS:Referer|!RE
15201528# negative look-behind construct. If that is the case, the backslash character
15211529# is allowed.
15221530#
1531+ # Not supported by re2 (?<!re).
1532+ #
15231533SecRule REQUEST_URI|REQUEST_HEADERS|ARGS|ARGS_NAMES "@rx (?<!\Q\\\E)\Q\\\E[cdeghijklmpqwxyz123456789]" \
15241534    "id:920460,\
15251535    phase:2,\
0 commit comments