Re: [mod-security-users] regex for matching urls
Brought to you by:
victorhora,
zimmerletw
From: Ivan R. <iv...@we...> - 2005-03-07 20:40:21
|
Peter Wood wrote: > I'm having someone help me test these rules. On my machine, this rule > matches just fine. On his machine, it doesn't match at all. He is > running mod_security 1.8.6, I'm running 1.8.7. Is there any difference > in between the two that might cause this not to match? No, there shouldn't be any. Is he running Apache 1.x and you Apache 2.x? These two have completely different regular expression engines. (The one in Apache 2.x being much better.) In my experience (I can't test now) \w does not work in Apache 1.x. (Neither do \d and \s.) The really interesting thing is that the documentation for Apache 1.x regex engine does not exist. Try replacing \w with [:word:], but beware [:word:] works only when used in [ and ]. So [\w\-_.]* becomes [[:word:]\-_.] -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |