tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator BasicAuthenticator.java
Date Sun, 16 May 2004 14:41:07 GMT
markt       2004/05/16 07:41:07

  Modified:    catalina/src/share/org/apache/catalina/authenticator
                        BasicAuthenticator.java
  Log:
  Fix bug 22176. Allow username and/or password to start and/or end in a space
   when using BASIC authentication
  . This is required by section 2 of RFC2617.
  
  Remove unused imports identified by Eclipse.
  
  Revision  Changes    Path
  1.14      +6 -8      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java
  
  Index: BasicAuthenticator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- BasicAuthenticator.java	24 Dec 2003 20:40:50 -0000	1.13
  +++ BasicAuthenticator.java	16 May 2004 14:41:07 -0000	1.14
  @@ -71,8 +71,6 @@
   import javax.servlet.http.HttpServletResponse;
   import org.apache.catalina.HttpRequest;
   import org.apache.catalina.HttpResponse;
  -import org.apache.catalina.Realm;
  -import org.apache.catalina.Session;
   import org.apache.catalina.deploy.LoginConfig;
   import org.apache.catalina.util.Base64;
   
  @@ -221,7 +219,7 @@
           int colon = unencoded.indexOf(':');
           if (colon < 0)
               return (null);
  -        String username = unencoded.substring(0, colon).trim();
  +        String username = unencoded.substring(0, colon);
           //        String password = unencoded.substring(colon + 1).trim();
           return (username);
   
  @@ -249,7 +247,7 @@
           if (colon < 0)
               return (null);
           //        String username = unencoded.substring(0, colon).trim();
  -        String password = unencoded.substring(colon + 1).trim();
  +        String password = unencoded.substring(colon + 1);
           return (password);
   
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message