Re: [squid-users] Problem regex /acl with corrupt / malformed url requests

From: Christoph Haas <email@dont-contact.us>
Date: Thu, 12 Jan 2006 21:24:39 +0100

On Thursday 12 January 2006 17:21, simon dray (BITS) wrote:
> we are trying create regex to prevent access to specifc area
>
> Eg:- acl xxxx_web url_regex -i ^http://www.xxx.xxx.xx/another level/
>
> If the url includes www.xxx.xxx.xx/anotherlevel// please note the double
> // this doesn't match the regex and therefore bypasses the acl is there
> anyway I can use regex / acl to catch this type of malformation.

Use /+ instead of /.

Besides if the URL really is like

 http://www.xxx.xxx.xx/anotherlevel//////

then this will still match your regular expression because you don't tell
the expression that it ends expliticly after that ($).

By the way... please escape the dots like:

 ^http://www\.xxx\.xxx\.xx/+another_level/

 Christoph

-- 
Never trust a system administrator who wears a tie and suit.
Received on Thu Jan 12 2006 - 13:24:47 MST

This archive was generated by hypermail pre-2.1.9 : Wed Feb 01 2006 - 12:00:01 MST