Re: [mod-security-users] Reason for case discrpency in variable names?
Brought to you by:
victorhora,
zimmerletw
|
From: Andrew H. <rub...@gm...> - 2021-10-29 09:12:58
|
Hello Quinn,
The syntax for *using* variables is subtly different to the syntax for
*defining* variables, e.g.
setvar:tx.my_thing
versus
SecRule TX:my_thing
At least in the Core Rule Set project, we try to emphasise this
difference by using upper-case letters for the collection (e.g. TX)
when *using* a variable and lower-case letters (e.g. tx) when
*defining* a variable. In addition, lower-case letters are used for
variables in both cases. (See:
https://github.com/coreruleset/coreruleset/blob/v3.4/dev/CONTRIBUTING.md#variable-naming-conventions).
It looks like the example from the ModSecurity Reference Manual you
mentioned also changes the case of the variable name, for even more
emphasis.
Hopefully that answers your question.
Thanks,
Andrew
|