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 FormAuthenticator.java LocalStrings.properties
Date Mon, 15 Mar 2004 22:19:15 GMT
markt       2004/03/15 14:19:15

  Modified:    catalina/src/share/org/apache/catalina/authenticator
                        FormAuthenticator.java LocalStrings.properties
  Log:
  Fix bug18005. Provide a better error message if session expires during login process.
  Need translations for new error string.
  
  Revision  Changes    Path
  1.22      +15 -6     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java
  
  Index: FormAuthenticator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- FormAuthenticator.java	24 Dec 2003 20:40:50 -0000	1.21
  +++ FormAuthenticator.java	15 Mar 2004 22:19:15 -0000	1.22
  @@ -279,11 +279,20 @@
               return (false);
           }
   
  -        // Save the authenticated Principal in our session
           if (debug >= 1)
               log("Authentication of '" + username + "' was successful");
  +
           if (session == null)
  -            session = getSession(request, true);
  +            session = getSession(request, false);
  +        if (session == null) {
  +            if (debug >=1)
  +                log("User took so long to log on the session expired");
  +            hres.sendError(HttpServletResponse.SC_REQUEST_TIMEOUT,
  +                           sm.getString("authenticator.sessionExpired"));
  +            return (false);
  +        }
  +        
  +        // Save the authenticated Principal in our session
           session.setNote(Constants.FORM_PRINCIPAL_NOTE, principal);
   
           // If we are not caching, save the username and password as well
  
  
  
  1.5       +1 -0      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/LocalStrings.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LocalStrings.properties	11 Oct 2001 16:58:22 -0000	1.4
  +++ LocalStrings.properties	15 Mar 2004 22:19:15 -0000	1.5
  @@ -8,5 +8,6 @@
   authenticator.notAuthenticated=Configuration error:  Cannot perform access control without
an authenticated principal
   authenticator.notContext=Configuration error:  Must be attached to a Context
   authenticator.notStarted=Security Interceptor has not yet been started
  +authenticator.sessionExpired=The time allowed for the login process has been exceeded.
If you wish to continue you must either click back twice and re-click the link you requested
or close and re-open your browser
   authenticator.unauthorized=Cannot authenticate with the provided credentials
   authenticator.userDataConstraint=This request violates a User Data constraint for this
application
  
  
  

---------------------------------------------------------------------
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