Re: Bug in url_regex pattern matching?

From: Dancer <dancer@dont-contact.us>
Date: Tue, 27 Jan 1998 01:28:01 +1000

Nick O'Brien wrote:

> We are running Squid-1.NOVM.17 on Digital Unix 3.2C.
>
> Due to policy decisions at our site we have to ban access to particular
> web sites because of their content.
>
> What we have in our squid.conf are the lines:
>
> acl banned url_regex "/path/to/squid/etc/banned-list"
> ..
> ..
> ..
> http_access deny banned
>
> Now in the the banned-list file I had the line:
>
> http://www.sex*
>
> which I expected would mean that acceses to any URL with http://www.sex in
> it would be denied. However I discovered that sites like
> http://www.sedon.co.uk/ were being denied as well. I know that it was this
> line as after I removed it, and restarted Squid - I was then able to
> access the above site.
>
> Is this a bug in the url_regex pattern matching mechanism or simply some
> misunderstanding on my part about how it should work?

Umm. The latter. '*' means 0 or more of any character only in glob-expression
matching (usually used by shells and the like). In regular expressions it
means 0 or more of the _previous_ character.

Go have a peek at 'man perlre' for a discussion on regular expression
patterns, perhaps.

D

--
Did you read the documentation AND the FAQ?
If not, I'll probably still answer your question, but my patience will
be limited, and you take the risk of sarcasm and ridicule.
Received on Mon Jan 26 1998 - 07:38:21 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:31 MST