Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C0221046A for ; Mon, 1 Jul 2013 17:09:05 +0000 (UTC) Received: (qmail 37982 invoked by uid 500); 1 Jul 2013 17:09:00 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 37859 invoked by uid 500); 1 Jul 2013 17:08:54 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 37846 invoked by uid 99); 1 Jul 2013 17:08:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2013 17:08:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2013 17:08:51 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 0A0801B098; Mon, 1 Jul 2013 17:08:31 +0000 (UTC) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: [Bug 55176] New: SSI regular expressions parsing fails Date: Mon, 01 Jul 2013 17:08:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 7 X-Bugzilla-Component: Catalina X-Bugzilla-Version: 7.0.39 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: david.reitter@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=55176 Bug ID: 55176 Summary: SSI regular expressions parsing fails Product: Tomcat 7 Version: 7.0.39 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: david.reitter@gmail.com Created attachment 30513 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30513&action=edit test cases 1, 2 and 3 Regular Expressions in SSI fail to parse. This uses SSI in 7.0.39 using SSIFilter. The file is parsed, in principle, but whenever an IF expression with a certain regular expression is encountered, Tomcat seems to either show an exception (test case 2) stop processing the file and will not return any contents after that (for test case 3). Certain very simple regular expressions such as /a/ do not show an error (test case 1). Example: My request is: http://...:8080/tomcat7_ssi_bug/foo.html?year=234234 The relevant portion of the file is (test case 3): I have tried a number of variants, including $QUERY_STRING instead of ${...}. I find no error about this in the logs. I tried simpler regular expressions. The following Leads to the error below: java.lang.ClassCastException: org.apache.catalina.ssi.ExpressionParseTree$EqualNode cannot be cast to org.apache.catalina.ssi.ExpressionParseTree$StringNode org.apache.catalina.ssi.ExpressionParseTree$CompareNode.compareBranches(ExpressionParseTree.java:353) org.apache.catalina.ssi.ExpressionParseTree$EqualNode.evaluate(ExpressionParseTree.java:381) org.apache.catalina.ssi.ExpressionParseTree.evaluateTree(ExpressionParseTree.java:67) org.apache.catalina.ssi.SSIConditional.evaluateArguments(SSIConditional.java:124) org.apache.catalina.ssi.SSIConditional.process(SSIConditional.java:50) org.apache.catalina.ssi.SSIProcessor.process(SSIProcessor.java:160) org.apache.catalina.ssi.SSIFilter.doFilter(SSIFilter.java:144) This occurs whenever the regular expression does not contain any parenthesis. Attached war file contains foo.html, showing test cases 1 and 2, and bar.html, showing test case 1 and 3. By the way, these regular expressions work as intended in Apache (httpd) 2. See also feature request #53387. (The back reference in this example is not what causes the exception.) -- 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