Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 11037 invoked from network); 27 Jul 2006 19:09:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Jul 2006 19:09:42 -0000 Received: (qmail 85510 invoked by uid 500); 27 Jul 2006 19:09:42 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 85148 invoked by uid 500); 27 Jul 2006 19:09:40 -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 85136 invoked by uid 99); 27 Jul 2006 19:09:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jul 2006 12:09:39 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jul 2006 12:09:38 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D5E30714294 for ; Thu, 27 Jul 2006 19:07:13 +0000 (GMT) Message-ID: <8492149.1154027233873.JavaMail.jira@brutus> Date: Thu, 27 Jul 2006 12:07:13 -0700 (PDT) From: "Peeter Piegaze (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Created: (JCR-517) Reserved status of namespace jcr not enforced. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Reserved status of namespace jcr not enforced. ---------------------------------------------- Key: JCR-517 URL: http://issues.apache.org/jira/browse/JCR-517 Project: Jackrabbit Issue Type: Bug Components: versioning Affects Versions: 1.1 Reporter: Peeter Piegaze Priority: Minor Fix For: 1.1 The failure to enforce the reserved status of the jcr namespace leads to at least one problem. A versionable node can be created with properties jcr:frozenPrimaryType, jcr:frozenMixinTypes or jcr:frozenUuid. These clash with the meta-data properties used in the nt:frozenNode. When the versionable is checked-in and then later restored, the corrupt frozen node can cause an exception. The following code demonstrates the problem: Repository repository = new TransientRepository(); Session session = repository.login(new SimpleCredentials("username", "password".toCharArray())); try { Node root = session.getRootNode(); Node a = root.addNode("a", "nt:unstructured"); a.addMixin("mix:versionable"); a.setProperty("jcr:frozenMixinTypes", new String[]{"x"}); session.save(); Version v = a.checkin(); a.checkout(); a.remove(); session.save(); root.restore(v, "a", true); } finally { session.logout(); } The solution is to enforce the reserved status of jcr (and nt, mix and xml, while we are at it). The rules should be: 1) A client cannot register a node type that uses reserved namespaces in either the name of the node type or in the name of any off its child item definitions. 2) A client cannot create a residual child item with a name that uses a reserved namespace. Clients can, of course, create an item with a reserved namespace if the item is defined in a built-in JCR node type. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira