Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-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 5E0C7472D for ; Wed, 29 Jun 2011 15:25:53 +0000 (UTC) Received: (qmail 85515 invoked by uid 500); 29 Jun 2011 15:25:53 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 85464 invoked by uid 500); 29 Jun 2011 15:25:52 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 85451 invoked by uid 99); 29 Jun 2011 15:25:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 15:25:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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; Wed, 29 Jun 2011 15:25:49 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DA73A4393AD for ; Wed, 29 Jun 2011 15:25:28 +0000 (UTC) Date: Wed, 29 Jun 2011 15:25:28 +0000 (UTC) From: "Lars Krapf (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <723617627.2803.1309361128891.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1332788457.2796.1309360888420.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (JCR-3007) setProperty access control evaluation does not properly cope with XA transactions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-3007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Krapf updated JCR-3007: ---------------------------- Attachment: transaction.patch > setProperty access control evaluation does not properly cope with XA transactions > --------------------------------------------------------------------------------- > > Key: JCR-3007 > URL: https://issues.apache.org/jira/browse/JCR-3007 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core > Affects Versions: 2.2.7 > Reporter: Lars Krapf > Labels: jackrabbit-core,, security,, transactions > Attachments: transaction.patch > > > This is another instance of the problems with ACL evaluation within transactions described in https://issues.apache.org/jira/browse/JCR-2999. > In this case PropertyImpl#getParent() called from PropertyImpl#checkSetValue() is trying to check read permissions of the yet uncommited parent and thus fails with an ItemNotFound exception. > The problem is reproducible with the following test: > public void testTransaction() throws Exception { > // make sure testUser has all privileges > Privilege[] privileges = privilegesFromName(Privilege.JCR_ALL); > givePrivileges(path, privileges, getRestrictions(superuser, path)); > // create new node and lock it > Session s = getTestSession(); > UserTransaction utx = new UserTransactionImpl(s); > utx.begin(); > // add node and save it > Node n = s.getNode(childNPath); > if (n.hasNode(nodeName1)) { > Node c = n.getNode(nodeName1); > c.remove(); > s.save(); > } > // create node and save > Node n2 = n.addNode(nodeName1); > s.save(); // -> node is NEW -> no failure > // set a property on a child node of an uncommited parent > n2.setProperty(propertyName1, "testSetProperty"); > s.save(); // -> fail because PropertyImpl#getParent called from PropertyImpl#checkSetValue > // was checking read permission on the not yet commited parent > // commit > utx.commit(); > } -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira