tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core LocalStrings.properties StandardContext.java
Date Mon, 12 Sep 2005 00:19:39 GMT
billbarker    2005/09/11 17:19:39

  Modified:    catalina/src/share/org/apache/catalina/core
                        LocalStrings.properties StandardContext.java
  Log:
  Per section 13.2 of the spec, warn if CR or LF is found in a <url-pattern>.
  
  Fix for Bug #36599
  
  Revision  Changes    Path
  1.24      +1 -0      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/LocalStrings.properties,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- LocalStrings.properties	1 Aug 2005 12:13:59 -0000	1.23
  +++ LocalStrings.properties	12 Sep 2005 00:19:38 -0000	1.24
  @@ -46,6 +46,7 @@
   standardContext.applicationListener=Error configuring application listener of class {0}
   standardContext.applicationSkipped=Skipped installing application listeners due to previous
error(s)
   standardContext.badRequest=Invalid request path ({0}).
  +standardContext.crlfinurl=The URL pattern "{0}" contains a CR or LF and so can never be
matched.
   standardContext.errorPage.error=Error page location {0} must start with a ''/''
   standardContext.errorPage.required=ErrorPage cannot be null
   standardContext.errorPage.warning=WARNING: Error page location {0} must start with a ''/''
in Servlet 2.4
  
  
  
  1.176     +4 -1      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.175
  retrieving revision 1.176
  diff -u -r1.175 -r1.176
  --- StandardContext.java	27 Jul 2005 15:11:21 -0000	1.175
  +++ StandardContext.java	12 Sep 2005 00:19:38 -0000	1.176
  @@ -4827,6 +4827,9 @@
   
           if (urlPattern == null)
               return (false);
  +        if (urlPattern.indexOf('\n') >= 0 || urlPattern.indexOf('\r') >= 0) {
  +            getLogger().warn(sm.getString("standardContext.crlfinurl",urlPattern));
  +        }
           if (urlPattern.startsWith("*.")) {
               if (urlPattern.indexOf('/') < 0)
                   return (true);
  
  
  

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