Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 88944 invoked from network); 2 May 2008 07:40:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 May 2008 07:40:50 -0000 Received: (qmail 37270 invoked by uid 500); 2 May 2008 07:40:51 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 36936 invoked by uid 500); 2 May 2008 07:40:50 -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 36924 invoked by uid 99); 2 May 2008 07:40:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2008 00:40:50 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2008 07:40:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DD527234C114 for ; Fri, 2 May 2008 00:36:58 -0700 (PDT) Message-ID: <938834775.1209713818905.JavaMail.jira@brutus> Date: Fri, 2 May 2008 00:36:58 -0700 (PDT) From: "Martijn Hendriks (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Assigned: (JCR-1450) move method of the MemoryFileSystem may accept invalid destination path resulting in invalid entries in FS In-Reply-To: <512569811.1204629400673.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martijn Hendriks reassigned JCR-1450: ------------------------------------- Assignee: Martijn Hendriks > move method of the MemoryFileSystem may accept invalid destination path resulting in invalid entries in FS > ---------------------------------------------------------------------------------------------------------- > > Key: JCR-1450 > URL: https://issues.apache.org/jira/browse/JCR-1450 > Project: Jackrabbit > Issue Type: Bug > Components: jackrabbit-core > Reporter: Denis Linine > Assignee: Martijn Hendriks > Priority: Trivial > > It seems there can be a problem with the move method of the MemoryFileSystem class: when looking at its code it looks that it can accept destinations, specifying folders that do not exist in the file system. > For example, if there is a "somefolder/somefile" file and I call the method passing, say "somefolder/someotherfolder/somefile" as the destination. The destination will be accepted by the code even if "somefolder/someotherfolder" is not an existing folder and the function execution will result in a file having the "somefolder/someotherfolder/somefile" path within a file system having no "somefolder/someotherfolder" folder - the code should probably check whether the destination path is really a valid one. Such validation could be performed , for example, in the following way: take all path elements from the destination path except the last one and insure that the resulting path points to an existing folder, throw an exception otherwise. > Currently I have no JackRabbit build/test environment set up and could not verify practically whether the issue described can really take place, the supposition is made after looking at the move method implementation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.