Author: markt Date: Mon Aug 13 12:25:57 2012 New Revision: 1372390 URL: http://svn.apache.org/viewvc?rev=1372390&view=rev Log: Additional fix for http://issues.apache.org/bugzilla/show_bug.cgi?id=53584 Store decoded and original request URI. Restore both. Use decoded for matching.
Modified: tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java tomcat/trunk/java/org/apache/catalina/authenticator/SavedRequest.java Modified: tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java?rev=1372390&r1=1372389&r2=1372390&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java Mon Aug 13 12:25:57 2012 @@ -475,12 +475,11 @@ public class FormAuthenticator } // Does the request URI match? - String requestURI = request.getDecodedRequestURI(); - if (requestURI == null) { + String decodedRequestURI = request.getDecodedRequestURI(); + if (decodedRequestURI == null) { return (false); } - return (requestURI.equals(sreq.getRequestURI())); - + return (decodedRequestURI.equals(sreq.getDecodedRequestURI())); } @@ -635,11 +634,11 @@ public class FormAuthenticator saved.setMethod(request.getMethod()); saved.setQueryString(request.getQueryString()); - saved.setRequestURI(request.getDecodedRequestURI()); + saved.setRequestURI(request.getRequestURI()); + saved.setDecodedRequestURI(request.getDecodedRequestURI()); // Stash the SavedRequest in our session for later use session.setNote(Constants.FORM_REQUEST_NOTE, saved); - } Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SavedRequest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/SavedRequest.java?rev=1372390&r1=1372389&r2=1372390&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/authenticator/SavedRequest.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/SavedRequest.java Mon Aug 13 12:25:57 2012 @@ -146,6 +146,21 @@ public final class SavedRequest { /** + * The decode request URI associated with this Request. Path parameters are + * also excluded + */ + private String decodedRequestURI = null; + + public String getDecodedRequestURI() { + return (this.decodedRequestURI); + } + + public void setDecodedRequestURI(String decodedRequestURI) { + this.decodedRequestURI = decodedRequestURI; + } + + + /** * The body of this request. */ private ByteChunk body = null; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org