Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-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 BD4AD109F3 for ; Fri, 31 Jan 2014 22:00:20 +0000 (UTC) Received: (qmail 15937 invoked by uid 500); 31 Jan 2014 22:00:13 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 15902 invoked by uid 500); 31 Jan 2014 22:00:12 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 15832 invoked by uid 99); 31 Jan 2014 22:00:10 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jan 2014 22:00:10 +0000 Date: Fri, 31 Jan 2014 22:00:10 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-5960) File API mishandles relative URLs that traverse directories above the FS root 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/CB-5960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13888217#comment-13888217 ] ASF subversion and git services commented on CB-5960: ----------------------------------------------------- Commit 4ce92dff1b554b0a5d3a5e88bac2cf019f9266ae in branch refs/heads/dev from [~iclelland] [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-file.git;h=4ce92df ] CB-5960: ios: android: Properly handle parent references in getFile/getDirectory > File API mishandles relative URLs that traverse directories above the FS root > ----------------------------------------------------------------------------- > > Key: CB-5960 > URL: https://issues.apache.org/jira/browse/CB-5960 > Project: Apache Cordova > Issue Type: Bug > Reporter: Ian Clelland > > Filesystem URLs should not be able to use ".." path components to reach outside of their sandbox. From the File API, ".." relative to a path resolves to the paths parent directory, and the parent directory of the filesystem root is itself. > So, if {{root}} is a DirectoryEntry representing the root of a filesystem, then > {code} > root.getFile("../file.txt", ...); > {code} > and > {code} > root.getFile("/file.txt", ...); > {code} > should resolve to the same file. > {code} > root.getDirectory("subdir_a/subdir_b", function(entry) { > entry.getFile("../file.txt", ...); > }, ...); > {code} > should resolve to "/subdir_a/file.txt" -- This message was sent by Atlassian JIRA (v6.1.5#6160)