http - ModSecurity does not read plus sign (for space sign) in regex -


i using regular expressions modsecurity rules , stuck on issue + sign (which used spaces in http request).

here secrule:

secrule args_post:sentence "!@rx ^[\+abcdefghijklmnopqrstuvwxyz]{12, 134}$" "phase:2,id:23,deny,log,status:406,msg:abnormal,tag:/web_attack/abnormal,severity:1" 

now if try 'sentence' parameter "hello stuggling regex", http request have "sentence=hello+i+am+struggling+with+regex". should go modsecurity blocks it. logs display:

[date] [:error] [pid info] [client info] modsecurity: access denied code 406 (phase 2). match of "rx ^[\\\\+abcdefghijklmnopqrstuvwxyz]{12, 134}$" against "args_post:sentence" required. [end of error msg] 

so looks when reading rule, modsecurity kind of magically adds 3 slashes.. believe problem comes have no idea think of , how solve it. have tried \+ adds 2 slashes. %2b actual + sign , not space 1 useless well. parameter 'email' , works fine '@' '.' '-' (\@ . - work without issue).

please tell me if more info needed.


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -