Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4F75498CC for ; Fri, 21 Oct 2011 16:48:53 +0000 (UTC) Received: (qmail 59516 invoked by uid 500); 21 Oct 2011 16:48:52 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 59442 invoked by uid 500); 21 Oct 2011 16:48:52 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 59434 invoked by uid 99); 21 Oct 2011 16:48:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2011 16:48:52 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2011 16:48:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 2F7EF3153F7 for ; Fri, 21 Oct 2011 16:46:32 +0000 (UTC) Date: Fri, 21 Oct 2011 16:46:32 +0000 (UTC) From: "Henri Biestro (Resolved) (JIRA)" To: issues@commons.apache.org Message-ID: <1407810438.1805.1319215592195.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <94619.340.1319189312196.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (JEXL-120) Make ParseException work in sandboxed environment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JEXL-120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Biestro resolved JEXL-120. -------------------------------- Resolution: Fixed Fix Version/s: 2.1 Committed revision 1187460. Made simpler version of ParseException that does not need to go through System.getProperty; Made error messages a bit easier to understand; trunk/src/main/java/org/apache/commons/jexl2/JexlException.java trunk/src/main/java/org/apache/commons/jexl2/parser/ParseException.java trunk/src/main/java/org/apache/commons/jexl2/parser/SimpleNode.java trunk/src/main/java/org/apache/commons/jexl2/parser/TokenMgrError.java trunk/src/test/java/org/apache/commons/jexl2/ParseFailuresTest.java > Make ParseException work in sandboxed environment > ------------------------------------------------- > > Key: JEXL-120 > URL: https://issues.apache.org/jira/browse/JEXL-120 > Project: Commons JEXL > Issue Type: Improvement > Affects Versions: 2.0.1 > Reporter: Lukas Krecan > Assignee: Henri Biestro > Fix For: 2.1 > > > We execute JEXL expressions in sandboxed environment (using Java policy mechanism). When the expression is incorrect, the {{org.apache.commons.jexl2.parser.ParseException}} is thrown. Unfortunately it tries to access {{System.getProperty("line.separator", "\n")}} which fails if access to system property is not allowed. > {code} > java.security.AccessControlException: access denied (java.util.PropertyPermission line.separator read) > at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) > at java.security.AccessController.checkPermission(AccessController.java:546) > at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) > at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285) > at java.lang.System.getProperty(System.java:686) > at org.apache.commons.jexl2.parser.ParseException.initialise(ParseException.java:91) > at org.apache.commons.jexl2.parser.ParseException.(ParseException.java:34) > at org.apache.commons.jexl2.parser.Parser.generateParseException(Parser.java:3601) > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira