On Thu, Sep 15, 2011 at 10:06, Francis GALIEGUE <f...@one2team.com> wrote:
> On Wed, Sep 14, 2011 at 20:49, Mark Eggers <its_toas...@yahoo.com> wrote:
> [...]
>>
>> 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.
>
> Yep, fair enough. But in this case "\." would have expanded to a dot
> and it would have matched anyway.
>
> @André: I do connect from localhost using wget, mainly:
>
> wget -O - -nv --http-user=xxxx --http-password=xxxx
> http://localhost:8080//manager/text/list
>
> But even so, using "127\\.0\\.0\\.1", I get 403... There definitely is
> something broken :(
>

OK, I've found the bug...

I have added an access log valve and here is what I see in it:

[15/Sep/2011:11:59:14 +0200] 0:0:0:0:0:0:0:1 (132 msec/964 bytes) 403
GET //manager/text/list HTTP/1.0

That explains it. So, I do have IPv6, but the valve doesn't recognize
::1 as being equivalent to the fully expanded IPv6 address... If it
only tries and matches the regex, the behaviour is therefore normal.

I have added 0:0:0:0:0:0:0:1 as an alternative instead of ::1 and it
does work...

So, PEBKAC mostly, but I think Tomcat should be able to treat reduced
IPv6 address formats.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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

Reply via email to