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 D41BB93AF for ; Wed, 16 Nov 2011 12:57:15 +0000 (UTC) Received: (qmail 25495 invoked by uid 500); 16 Nov 2011 12:57:15 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 25433 invoked by uid 500); 16 Nov 2011 12:57:15 -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 25426 invoked by uid 99); 16 Nov 2011 12:57:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2011 12:57:15 +0000 X-ASF-Spam-Status: No, hits=-2001.2 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; Wed, 16 Nov 2011 12:57:12 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 0ACA0884B3 for ; Wed, 16 Nov 2011 12:56:52 +0000 (UTC) Date: Wed, 16 Nov 2011 12:56:52 +0000 (UTC) From: "Jukka Zitting (Updated) (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <1189753733.34755.1321448212045.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <29799028.36571295361283655.JavaMail.jira@thor> Subject: [jira] [Updated] (JCR-2863) Session#importXML can't handle properly uuid collision if user has insufficient permission 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-2863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jukka Zitting updated JCR-2863: ------------------------------- Fix Version/s: 2.2.10 Merged to the 2.2 branch in revision 1202684. > Session#importXML can't handle properly uuid collision if user has insufficient permission > ------------------------------------------------------------------------------------------ > > Key: JCR-2863 > URL: https://issues.apache.org/jira/browse/JCR-2863 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core, xml > Affects Versions: 1.6.1, 2.2.1 > Reporter: Antoine Brochard > Fix For: 2.2.10, 2.3 > > Attachments: exception.txt > > > When importing referenceable nodes, if there are nodes with the same uuid in the workspace but the session has no sufficient permission to read them then the import will fail no matter what ImportUUIDBehavior is chosen. > But the same xml will be imported successfully in another repository or if the user have read access. > SessionImpl.java : > public NodeImpl getNodeById(NodeId id) ...{ > ... > try { > return (NodeImpl) getItemManager().getItem(id); > } catch (AccessDeniedException ade) { > throw new ItemNotFoundException(id.toString()); > } > } > SessionImporter.java : > public void startNode(NodeInfo nodeInfo, List propInfos)...{ > ... > if (node == null) { > // create node > if (id == null) { > ... > } else { > // potential uuid conflict > NodeImpl conflicting; > try { > conflicting = session.getNodeById(id); > } catch (ItemNotFoundException infe) { > conflicting = null; > } > if (conflicting != null) { > // resolve uuid conflict > ... > } > ... > } > In the JCR 1.0 spec says "lack of read access to an item blocks access to both information about the content of that item and information about the existence of the item" but this should probably not be true, internally, when doing an import. > Otherwise it means that read access to an entire workspace must be granted to a user so that it could successfully use the IMPORT_UUID_CREATE_NEW behaviour. -- 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