You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/11/01 10:31:22 UTC

[Bug 58567] New: Error compiling EL expression with quotes - attribute not properly terminated.

https://bz.apache.org/bugzilla/show_bug.cgi?id=58567

            Bug ID: 58567
           Summary: Error compiling EL expression with quotes - attribute
                    not properly terminated.
           Product: Tomcat 8
           Version: 8.0.27
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: amir.yoni@gmail.com

The following page fails to compile in tomcat 8.0.27 and 8.0.28. It works in
all prior versions that we ever tried, including earlier versions of 8.x, and
also versions of 7.x and 6.x. It is a regression and it breaks many pages in my
application.

Here is the JSP text:

<%@ page pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%

    request.setAttribute("myAccountEmail", "test@example.com");

%>
<c:if test="${(myAccountEmail != null) && (myAccountEmail != \"\")}">
    not empty
</c:if>

Note #1: trying to use system property org.apache.jasper.compiler.
Parser.STRICT_QUOTE_ESCAPING=false doesn't help. Although, even if it did, I
don't think it is a valid solution/workaround, as I am not in control of the
tomcat deployment - I can't tell all my clients to add this property.

Note #2: I know that I can use EL empty operator. My concern right now is with
existing code deployed at clients' sites.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 58567] Error compiling EL expression with quotes - attribute not properly terminated.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58567

Yoni Amir <am...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Yoni Amir <am...@gmail.com> ---
I forgot to add the error itself:

org.apache.jasper.JasperException: /index.jsp (line: 8, column: 12) attribute
value for [test] is not properly terminated
   
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41)
   
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:275)
   
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:91)
    org.apache.jasper.compiler.Parser.parseAttributeValue(Parser.java:270)
    org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:235)
    org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:163)
    org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:154)
    org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1236)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1455)
    org.apache.jasper.compiler.Parser.parse(Parser.java:139)
   
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:227)
   
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
   
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 58567] Error compiling EL expression with quotes - attribute not properly terminated.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58567

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #4 from Mark Thomas <ma...@apache.org> ---
This was correctly marked as a duplicate of 57136.

This issue described is not a regression, it is a side effect of fixing the
long standing bug in EL parsing described in 57136.

*** This bug has been marked as a duplicate of bug 57136 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 58567] Error compiling EL expression with quotes - attribute not properly terminated.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58567

Violeta Georgieva <vi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Violeta Georgieva <vi...@apache.org> ---


*** This bug has been marked as a duplicate of bug 57136 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 58567] Error compiling EL expression with quotes - attribute not properly terminated.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58567

Yoni Amir <am...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|DUPLICATE                   |---
             Status|RESOLVED                    |REOPENED

--- Comment #3 from Yoni Amir <am...@gmail.com> ---
Why did you resolve this bug as duplicate? They may sound similar but I think
the severity of them is much different.
The other bug, 57136, exists in tomcat 7, and I never encountered it in my life
or felt its pain in any way.
This bug, however, is a regression between 8.0.26 and 8.0.27 and is hurting my
JSPs very badly.
57136 is about $ and #, this bug is about quotes.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 58567] Error compiling EL expression with quotes - attribute not properly terminated.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58567

--- Comment #5 from Yoni Amir <am...@gmail.com> ---
Hi Mark,
I am not sure if I understand your claim: you are saying that the side-effect
is not a regression. Are you saying that it is a desired side-effect?
Also, I see that 57136 is still open. Are there plans to fix it soon? Was this
fix that you refer to (the one that created the side-effect) applied in 8.0.27?
Thanks,
Yoni

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 58567] Error compiling EL expression with quotes - attribute not properly terminated.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58567

--- Comment #6 from Mark Thomas <ma...@apache.org> ---
(In reply to Yoni Amir from comment #5)

Try reading the bug report for 57136. The answers to all of your questions may
be found there.

> I am not sure if I understand your claim: you are saying that the
> side-effect is not a regression.

Yes.

> Are you saying that it is a desired side-effect?

Yes.

> Also, I see that 57136 is still open.

It is open for an enhancement to add an option to restore the broken behaviour
to give those users with broken web applications to upgrade to newer Tomcat
versions without having to fix their applications.

> Are there plans to fix it soon?

The issue has already been fixed. There are no plans to implement the
enhancement that I am aware of.

> Was  this fix that you refer to (the one that created the side-effect)
> applied in 8.0.27?

Yes.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org