tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Denying IPs using the Valve command in context.xml
Date Wed, 05 Oct 2011 22:06:41 GMT
Hash: SHA1


On 10/5/2011 10:28 AM, Mark H. Wood wrote:
> Having said that, I think that an anchored partial match 
> (lookingAt()) really is the least-bad fit to the address problem, 
> since we're usually more concerned about the first, second, and 
> perhaps third quads of an IP address and the trailing part is 
> considered insignificant.

Again, I'm guessing that this just isn't going to change, no matter how
good the arguments are, unless there is some new syntax that
differentiates the old behavior from the new (such as adding prefix and
postfix / like /\.0\./ if you want to match anything that has a 0 as
either of the middle two octets of an IPv4 address).

> As I posted previously, though, it's still pretty bad: how would
> you match a /27?

This valve can't do that, anyway. If you want /27, you have to list them
all out. Note that there is a patch currently under development to
handle CIDR masks such as this one:

> Domain matches, OTOH, might take matches() as least-bad of the
> regex types, since the prefix tends to be the don't-care part.

I see these as mirror-images of one-another: the implementation fails in
both cases by requiring you to add .* to either the beginning or the end
of your regular expression.

No matter what else happens, it's worth pointing-out in the
documentation what's really going on, here.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message