You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ki...@apache.org on 2003/01/11 01:11:07 UTC
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties messages_es.properties messages_fr.properties messages_ja.properties
kinman 2003/01/10 16:11:06
Modified: jasper2/src/share/org/apache/jasper/compiler Node.java
Parser.java TagPluginManager.java
jasper2/src/share/org/apache/jasper/resources
messages.properties messages_es.properties
messages_fr.properties messages_ja.properties
Log:
- Fix 15851: nested jsp:attribute should be disallowed.
Revision Changes Path
1.52 +11 -8 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java
Index: Node.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- Node.java 8 Jan 2003 18:42:43 -0000 1.51
+++ Node.java 11 Jan 2003 00:11:06 -0000 1.52
@@ -1333,11 +1333,14 @@
}
childInfo = new ChildInfo();
name = this.getAttributeValue("name");
- localName = name;
- int index = name.indexOf(':');
- if (index != -1) {
- prefix = name.substring(0, index);
- localName = name.substring(index+1);
+ if (name != null) {
+ // Mandatary attribute "name" will be checked in Validator
+ localName = name;
+ int index = name.indexOf(':');
+ if (index != -1) {
+ prefix = name.substring(0, index);
+ localName = name.substring(index+1);
+ }
}
}
1.54 +7 -3 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java
Index: Parser.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- Parser.java 9 Jan 2003 23:54:40 -0000 1.53
+++ Parser.java 11 Jan 2003 00:11:06 -0000 1.54
@@ -1568,6 +1568,10 @@
err.jspError( reader.mark(), "jsp.error.not.in.template",
"Expression language" );
} else if (reader.matches("<jsp:")) {
+ if ((parent instanceof Node.NamedAttribute) &&
+ reader.matches("attribute")) {
+ err.jspError(reader.mark(), "jsp.error.nested.jspattribute");
+ }
err.jspError( reader.mark(), "jsp.error.not.in.template",
"Standard actions" );
} else if (parseCustomTag(parent)) {
1.10 +5 -8 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagPluginManager.java
Index: TagPluginManager.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagPluginManager.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TagPluginManager.java 1 Jan 2003 12:25:58 -0000 1.9
+++ TagPluginManager.java 11 Jan 2003 00:11:06 -0000 1.10
@@ -99,12 +99,9 @@
page.visit(new Node.Visitor() {
public void visit(Node.CustomTag n)
- throws JasperException {
+ throws JasperException {
invokePlugin(n);
- Node.Nodes body = n.getBody();
- if (body != null) {
- body.visit(this);
- }
+ visitBody(n);
}
});
1.78 +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.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- messages.properties 9 Jan 2003 23:54:40 -0000 1.77
+++ messages.properties 11 Jan 2003 00:11:06 -0000 1.78
@@ -350,3 +350,4 @@
jsp.error.tagfile.illegalPath=Illegal tag file path: {0}, must start with \"/WEB-INF/tags\" or \"/META-INF/tags\"
jsp.error.plugin.wrongRootElement=Name of root element in {0} different from {1}
jsp.error.attribute.invalidPrefix=The attribute prefix {0} does not correspond to any imported tag library
+jsp.error.nested.jspattribute=a jsp:attribute standard action cannot be nested within another jsp:attribute standard action
1.27 +2 -1 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties
Index: messages_es.properties
===================================================================
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- messages_es.properties 12 Dec 2002 22:30:30 -0000 1.26
+++ messages_es.properties 11 Jan 2003 00:11:06 -0000 1.27
@@ -258,3 +258,4 @@
jsp.error.xml.closeQuoteMissingInXMLDecl=
jsp.error.xml.invalidHighSurrogate=
jsp.error.attributes.not.allowed=
+jsp.error.nested.jspattribute=
1.10 +2 -1 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_fr.properties
Index: messages_fr.properties
===================================================================
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_fr.properties,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- messages_fr.properties 12 Dec 2002 22:30:30 -0000 1.9
+++ messages_fr.properties 11 Jan 2003 00:11:06 -0000 1.10
@@ -297,3 +297,4 @@
jsp.error.tagfile.var_name_given_equals_attr_name=Dans le fichier de tag {0}, l''attribut name-given ({1}) de la directive variable est �gal au nom d''attribut de la directive attribute
jsp.error.useBean.noSession=Il est ill�gal pour useBean d''utiliser une port�e de session (session scope) quand la page JSP indique (via la directive de page) qu''elle ne participe pas aux sessions
jsp.error.attributes.not.allowed = {0} ne doit avoir aucun attribut
+jsp.error.nested.jspattribute=
1.27 +2 -1 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_ja.properties
Index: messages_ja.properties
===================================================================
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_ja.properties,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- messages_ja.properties 12 Dec 2002 22:30:30 -0000 1.26
+++ messages_ja.properties 11 Jan 2003 00:11:06 -0000 1.27
@@ -289,3 +289,4 @@
jsp.error.xml.closeQuoteMissingInXMLDecl=
jsp.error.xml.invalidHighSurrogate=
jsp.error.attributes.not.allowed=
+jsp.error.nested.jspattribute=
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>