tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfarc...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteRequest.java
Date Fri, 06 Jun 2003 03:03:33 GMT
jfarcand    2003/06/05 20:03:33

  Modified:    catalina/src/share/org/apache/coyote/tomcat5
                        CoyoteRequest.java
  Log:
  When the SecurityManager is turned on, the facade is never properly garbaged. Bugtraq 48
  66915 demonstrates a case where CoyoteRequestFacade is re-used with a request object equ
  als to null (the getAttribute throws NPE). The bug also exists in Tomcat 4.1.x. (should
  I port the patch?)
  
  Also, the way response are recycled may also produce the same behaviour, althrough I can
  't reproduce the exception.
  
  Revision  Changes    Path
  1.8       +6 -7      jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CoyoteRequest.java	5 Jun 2003 19:47:41 -0000	1.7
  +++ CoyoteRequest.java	6 Jun 2003 03:03:33 -0000	1.8
  @@ -597,9 +597,9 @@
        * is the facade.  This method must be implemented by a subclass.
        */
       public ServletRequest getRequest() {
  -        if (facade == null) {
  +        if (facade == null || Constants.SECURITY) {
               facade = new CoyoteRequestFacade(this);
  -        }
  +        } 
           return (facade);
       }
   
  @@ -728,7 +728,6 @@
        * Set the Wrapper within which this Request is being processed.  This
        * must be called as soon as the appropriate Wrapper is identified, and
        * before the Request is ultimately passed to an application servlet.
  -     *
        * @param wrapper The newly associated Wrapper
        */
       public void setWrapper(Wrapper wrapper) {
  
  
  

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