MXS-1346: Disallow convoluted rule names
The rule names could have punctuation in them which caused unnecessary complexity. Keeping the identifiers simple makes it easier to process.
This commit is contained in:
@ -89,6 +89,11 @@ The `function` type rule will now match a query that does not use a function
|
|||||||
when the filter is in whitelist mode (`action=allow`). This means that queries
|
when the filter is in whitelist mode (`action=allow`). This means that queries
|
||||||
that don't use functions are allowed though in whitelist mode.
|
that don't use functions are allowed though in whitelist mode.
|
||||||
|
|
||||||
|
#### Rule Names
|
||||||
|
|
||||||
|
Rule names can no longer use punctuation in them and can consist only of
|
||||||
|
alphanumeric characters, underscores and hyphens.
|
||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
|
|
||||||
When known, the session id will be included in all logged messages. This allows
|
When known, the session id will be included in all logged messages. This allows
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
%option reentrant noyywrap bison-bridge prefix="dbfw_yy"
|
%option reentrant noyywrap bison-bridge prefix="dbfw_yy"
|
||||||
%option yylineno
|
%option yylineno
|
||||||
|
|
||||||
RULENAME [-_[:alnum:][:punct:]]+
|
RULENAME [-_[:alnum:]]+
|
||||||
STR [_[:alnum:]]+
|
STR [_[:alnum:]]+
|
||||||
TIME [0-9]{2}:[0-9]{2}:[0-9]{2}-[0-9]{2}:[0-9]{2}:[0-9]{2}
|
TIME [0-9]{2}:[0-9]{2}:[0-9]{2}-[0-9]{2}:[0-9]{2}:[0-9]{2}
|
||||||
QSTR (\"[^\"]*\")|('[^']*')
|
QSTR (\"[^\"]*\")|('[^']*')
|
||||||
@ -29,7 +29,6 @@ INT [0-9]+
|
|||||||
FLOAT [0-9]+[.][0-9]+
|
FLOAT [0-9]+[.][0-9]+
|
||||||
SQL select|insert|update|delete|grant|revoke|drop|create|alter|use|load
|
SQL select|insert|update|delete|grant|revoke|drop|create|alter|use|load
|
||||||
PIPE [|]
|
PIPE [|]
|
||||||
USER [^[:space:]]*[@]
|
|
||||||
IP [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}
|
IP [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}
|
||||||
BTSTR `[^`]*`
|
BTSTR `[^`]*`
|
||||||
USTR [%-_[:alnum:][:punct:]]+
|
USTR [%-_[:alnum:][:punct:]]+
|
||||||
|
Reference in New Issue
Block a user