----- Original Message -----

> From: Francis GALIEGUE <f...@one2team.com>
> To: Tomcat Users List <users@tomcat.apache.org>
> Cc: 
> Sent: Wednesday, September 14, 2011 8:42 AM
> Subject: Re: tomcat 7.0.21: bug in RemoteAddrValve?
> 
> On Wed, Sep 14, 2011 at 17:28, André Warnier <a...@ice-sa.com> wrote:
>>  Francis GALIEGUE wrote:
> [...]
>>>     <Valve 
> className="org.apache.catalina.valves.RemoteAddrValve"
>>>         allow="127\.0\.0\.1|::1"/>
> [...]
>>> 
>>  Maybe try to modify that regexp somewhat, like to
>>  allow="(127\.0\.0\.1)|(::1)"
>>  or
>>  allow="127\.0\.0\.1|\:\:1"
>>  just in case the regexp library version changed, and it now interprets the
>>  original expression slightly differently ?
> 
> Nope... I also tried 127\.0\.0\.1 alone and no dice.
> 
> I'll try your two other suggestions but if any works, it means the
> regex engine used is seriously buggy!
> 
>>  Could it also be that previously, Tomcat saw an IPv4 address and it worked,
>>  but now it sees an IPv6 address and the "::1" part in fact never 
> worked, but
>>  was never used before ?
>> 
> 
> The machine has IPv4 only. I just put in the ::1 in prevision of a not
> so distant future...
> 
> But maybe it is some other part of the configuration (server.xml?
> default context.xml?) which needs to be changed?
>

I've not tried this in Tomcat, but here's a thought.

According to:

http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Remote_Address_Filter


Tomcat uses java.util.regex for pattern matching. This means that if you want a 
string regular expression to include a ".", you'll end up entering it as \\.

Try using "127\\.0\\.0\\.1|::1" and see if that fixes your problem.

I have no idea why it would work in previous versions (have not checked the 
change log).

. . . . just my two cents.
/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to