How to REQUEST_URI ARGS or Params Dynamic in ModSecurity

598 Views Asked by At

Example url /outlet/?filter_cor=linho,metalizado,caramelo,bordo,listrad

I would like to know if it is possible to make a rule in modSecurity that where are the arguments "linho,metalizado,caramelo,bordo,listrad" if the names are changed he accepts the same rule

SOLVED

SecRule REQUEST_URI "@contains outlet/?filter_cor" "id:1,phase:1,deny,status:409,msg:'Denied'"

1

There are 1 best solutions below

1
On

I am not sure I understand your question correctly. But if you want to check a list of alternatives in arguments, you can do it like this:

SecRule ARGS:filter_cor "@rx ^(?:linho|metalizado|caramelo|bordo|listrad)$" "log,auditlog,phase:1,id:1,t:lowercase,msg:'some text',block"