I looked at the javadocs for the RemoteAddrValve and they provided no
further clarity on the syntax issue.

You're right, my test case mistakenly returned a false positive, ".*" could
match anything its true and their is no "common sense" wildcard in the Java
Regex package.  I looked at the javadoc for the regex package and found it a
little too pedantic.  I thought javadocs were supposed to be human-readable
;-)

thanks for the help

On Sun, Apr 5, 2009 at 2:41 PM, André Warnier <a...@ice-sa.com> wrote:

> André Warnier wrote:
> [...]
>
>>
>> To match any address starting with "192.168.", use
>> <Valve className="org.apache.catalina.valves.RemoteAddrValve"
>>  allow="192\.168\..*"/>
>> or (if you want to be really finicky about it)
>> <Valve className="org.apache.catalina.valves.RemoteAddrValve"
>>  allow="192\.168\.\d{1,3}\.\d{1,3}"/>
>>
>>  What is not very clear in the on-line Tomcat documentation, is whether a
> remote client address of 192.168.1.2 would be translated to the string
> "192.168.1.2" by Tomcat prior to matching in the Valve, or to for example
> "192.168.001.002".
> Maybe the Valve source code is clearer ?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to