Author: kkolinko
Date: Sun May 11 18:05:40 2014
New Revision: 1593832
URL: http://svn.apache.org/r1593832
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56334
Additional change missed in back-port to fix BZ 56334
Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1593832&r1=1593831&r2=1593832&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun May 11 18:05:40 2014
@@ -28,11 +28,6 @@ None
PATCHES PROPOSED TO BACKPORT:
[ New proposals should be added at the end of the list ]
-* Additional change missed in back-port to fix BZ 56334
- http://people.apache.org/~markt/patches/2014-04-28-bug56334-tc6-v1.patch
- +1: markt, kkolinko, fhanik
- -1:
-
* Correct the handling of back-slash escaping in the EL parser and no longer
require that "\$" or "\#" must be followed by "{" in order for the back-slash
escaping to take effect.
Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java?rev=1593832&r1=1593831&r2=1593832&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java Sun May
11 18:05:40 2014
@@ -1059,6 +1059,7 @@ class Validator {
pageInfo.isDeferredSyntaxAllowedAsLiteral() ||
libraryVersion < 2.1;
+ String attributeValue;
ELNode.Nodes el = null;
if (!runtimeExpression && !pageInfo.isELIgnored()) {
el = ELParser.parse(attrs.getValue(i),
@@ -1083,6 +1084,14 @@ class Validator {
}
}
}
+ if (elExpression) {
+ attributeValue = attrs.getValue(i);
+ } else {
+ // Should be a single Text node
+ attributeValue = ((ELNode.Text)
el.iterator().next()).getText();
+ }
+ } else {
+ attributeValue = attrs.getValue(i);
}
boolean expression = runtimeExpression || elExpression;
@@ -1138,18 +1147,18 @@ class Validator {
}
// Check casting
try {
- ELSupport.checkType(attrs.getValue(i),
expectedClass);
+ ELSupport.checkType(attributeValue,
expectedClass);
} catch (Exception e) {
err.jspError
(n, "jsp.error.coerce_to_type",
- tldAttr.getName(), expectedType,
attrs.getValue(i));
+ tldAttr.getName(), expectedType,
attributeValue);
}
}
jspAttrs[i] = new Node.JspAttribute(tldAttr,
attrs.getQName(i), attrs.getURI(i),
attrs
.getLocalName(i),
- attrs.getValue(i), false, null, false);
+ attributeValue, false, null, false);
} else {
if (deferred && !tldAttr.isDeferredMethod() &&
!tldAttr.isDeferredValue()) {
@@ -1178,7 +1187,7 @@ class Validator {
jspAttrs[i] = new
Node.JspAttribute(tldAttr,
attrs.getQName(i),
attrs.getURI(i),
attrs.getLocalName(i),
- attrs.getValue(i), false, el,
false);
+ attributeValue, false, el,
false);
ELContextImpl ctx = new
ELContextImpl();
ctx.setFunctionMapper(getFunctionMapper(el));
try {
@@ -1186,7 +1195,7 @@ class Validator {
} catch (ELException e) {
this.err.jspError(n.getStart(),
"jsp.error.invalid.expression",
- attrs.getValue(i),
e.toString());
+ attributeValue,
e.toString());
}
} else {
// Runtime expression
@@ -1213,7 +1222,7 @@ class Validator {
jspAttrs[i] = new Node.JspAttribute(tldAttr,
attrs.getQName(i), attrs.getURI(i), attrs
.getLocalName(i),
- attrs.getValue(i), false, null, false);
+ attributeValue, false, null, false);
}
if (expression) {
tagDataAttrs.put(attrs.getQName(i),
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]