For the Tomcat part: Christopher Schultz schrieb: > All, > > One of the unit tests is failing in the securityfilter project which > uses Tomcat (5.5) and httpunit for the tests themselves. > > Basically, a test written a loooong time ago seems to be failing after > the fix for a bug which involves decoding of %2F in a URL into a '/'. > > Either through mod_jk or directly to Tomcat's HTTP connector, now, any > request that has a / replaced with a %2F will not work. I'm pretty sure > this was a security fix. > > I was wondering if anyone could explain what the initial problem was, > why this was "fixed" and if it makes any sense for me to try to fix this > test in any meaningful way, or if it should be simply removed. > > (And yes, I have read this: > http://tomcat.apache.org/security-5.html#Fixed in Apache Tomcat 5.5.22, > 5.0.SVN. I still don't get it... shouldn't it work properly when using > the HTTP connector?)
This page says: ------- Tomcat permits '\', '%2F' and '%5C' as path delimiters. When Tomcat is used behind a proxy (including, but not limited to, Apache HTTP server with mod_proxy and mod_jk) configured to only proxy some contexts, a HTTP request containing strings like "/\../" may allow attackers to work around the context restriction of the proxy, and access the non-proxied contexts. The following Java system properties have been added to Tomcat to provide additional control of the handling of path delimiters in URLs (both options default to false): org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH: true|false org.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH: true|false Due to the impossibility to guarantee that all URLs are handled by Tomcat as they are in proxy servers, Tomcat should always be secured as if no proxy restricting context access was used. ------ and by default both are false, i.e. disallowed. If you need to use such URLs, you need to set one or both of them to true (as a system property). > Thanks, > -chris HTH Rainer --------------------------------------------------------------------- To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
