Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions regex-assembly/942120.ra
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,8 @@
##! Operators == and -> are sourced from https://sqlite.org/lang_expr.html
##!+ i

\=\=
\!\=
\&\&
\|\|
->
>>
<<
>=
<=
<>
##!> include sql-operators

\bxor\b
\bregexp\b
regexp\s+binary
Expand Down
6 changes: 4 additions & 2 deletions regex-assembly/942520.ra
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
is\s+not\b
##! all sqlite not smth from https://www.sqlite.org/lang_expr.html
not\s+(?:like|glob|between|null|in|regexp|match)\b
##! sql operators
[|&<>*\/%=^+-]{1,3}

##!> include sql-operators

##! common operators that can't be added to 942120.data

(?:mod|div)\b
sounds\s+like\b
15 changes: 15 additions & 0 deletions regex-assembly/include/sql-operators.ra
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
##! Please refer to the documentation at
##! https://coreruleset.org/docs/development/regex_assembly/.

##! This is a list of various SQL operators used across different database engines.

\=\=
\!\=
\&\&
\|\|
->
>>
<<
>=
<=
<>
2 changes: 1 addition & 1 deletion rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAME
# (consult https://coreruleset.org/docs/development/regex_assembly/ for details):
# crs-toolchain regex update 942520
#
SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx (?i)[\"'`][\s\x0b]*?(?:(?:is[\s\x0b]+not|not[\s\x0b]+(?:like|glob|(?:betwee|i)n|null|regexp|match)|mod|div|sounds[\s\x0b]+like)\b|[%&\*\+\-/<->\^\|]{1,3})" \
SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx (?i)[\"'`][\s\x0b]*?(?:(?:is[\s\x0b]+not|not[\s\x0b]+(?:like|glob|(?:betwee|i)n|null|regexp|match)|mod|div|sounds[\s\x0b]+like)\b|[!=]=|&&|\|\||->|>[=>]|<[<->])" \
"id:942520,\
phase:2,\
block,\
Expand Down
Loading