tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm RealmBase.java
Date Fri, 01 Apr 2005 21:18:28 GMT
luehe       2005/04/01 13:18:28

  Modified:    catalina/src/share/org/apache/catalina/realm RealmBase.java
  Log:
  Do not add context path to login and error pages, since we are
  comparing them against request.getRequestPathMB().toString(),
  which does not include context path.
  
  hasResourcePermission() used to compare login and error pages against
  request.getDecodedRequestURI(), which does include context path, but
  this was changed in rev 1.49 to compare them against
  request.getRequestPathMB().toString(), to be consistent with
  findSecurityConstraints().
  
  Revision  Changes    Path
  1.51      +3 -3      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/RealmBase.java
  
  Index: RealmBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/RealmBase.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- RealmBase.java	25 Mar 2005 08:29:34 -0000	1.50
  +++ RealmBase.java	1 Apr 2005 21:18:28 -0000	1.51
  @@ -703,13 +703,13 @@
           if ((config != null) &&
               (Constants.FORM_METHOD.equals(config.getAuthMethod()))) {
               String requestURI = request.getRequestPathMB().toString();
  -            String loginPage = context.getPath() + config.getLoginPage();
  +            String loginPage = config.getLoginPage();
               if (loginPage.equals(requestURI)) {
                   if (log.isDebugEnabled())
                       log.debug(" Allow access to login page " + loginPage);
                   return (true);
               }
  -            String errorPage = context.getPath() + config.getErrorPage();
  +            String errorPage = config.getErrorPage();
               if (errorPage.equals(requestURI)) {
                   if (log.isDebugEnabled())
                       log.debug(" Allow access to error page " + errorPage);
  
  
  

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