markt       2004/01/03 05:58:39

  Modified:    jasper2/src/share/org/apache/jasper/compiler Tag:
                        tomcat_4_branch TagLibraryInfoImpl.java
               jasper2/src/share/org/apache/jasper/resources Tag:
                        tomcat_4_branch messages.properties
  Log:
  - Fix bug 11069. Check that the location of the TLD file is spec compliant.
  - Ported from TC5.
  - Note that the JSP 1.2 spec is less restrictive than the JSP 2.0 spec.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.2.2   +10 -4     
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- TagLibraryInfoImpl.java   3 Mar 2003 07:51:18 -0000       1.2.2.1
  +++ TagLibraryInfoImpl.java   3 Jan 2004 13:58:39 -0000       1.2.2.2
  @@ -5,7 +5,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999,2004 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -179,6 +179,12 @@
               } catch (FileNotFoundException ex) {
                   err.jspError("jsp.error.file.not.found", location[0]);
               }
  +
  +            // Check TLD file location conforms to JSP.7.3.1
  +            if (!location[0].startsWith("/WEB-INF/")) {
  +                err.jspError("jsp.error.tld.invalid.location", location[0]);
  +            }
  +
               // Now parse the tld.
               parseTLD(ctxt, location[0], in);
           } else {
  
  
  
  No                   revision
  No                   revision
  1.9.2.9   +2 -1      
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties
  
  Index: messages.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v
  retrieving revision 1.9.2.8
  retrieving revision 1.9.2.9
  diff -u -r1.9.2.8 -r1.9.2.9
  --- messages.properties       27 Mar 2003 00:13:51 -0000      1.9.2.8
  +++ messages.properties       3 Jan 2004 13:58:39 -0000       1.9.2.9
  @@ -148,6 +148,7 @@
   jsp.error.missing_attribute=According to the TLD attribute {0} is mandatory for tag 
{1}
   jsp.error.bad_attribute=Attribute {0} invalid according to the specified TLD
   jsp.error.tld_not_found=Could not locate TLD {0}
  +jsp.error.tld.invalid.location=\"{0}\" is not a valid location for a TLD as per JSP 
specification JSP.7.3.1
   jsp.error.webxml_not_found=Could not locate web.xml
   jsp.cmd_line.usage=Usage: jsptoservlet [-o <path/to/outputDirectory>] 
[-keepgenerated] \
   <.jsp files>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to