You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ian Clelland (JIRA)" <ji...@apache.org> on 2013/10/07 20:13:43 UTC
[jira] [Assigned] (CB-4952) resolveLocalFileSystemURI returns
SECURITY_ERROR wrongly in iOS
[ https://issues.apache.org/jira/browse/CB-4952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ian Clelland reassigned CB-4952:
--------------------------------
Assignee: Ian Clelland
> resolveLocalFileSystemURI returns SECURITY_ERROR wrongly in iOS
> ---------------------------------------------------------------
>
> Key: CB-4952
> URL: https://issues.apache.org/jira/browse/CB-4952
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin File
> Affects Versions: 3.0.0
> Environment: iOS
> Reporter: Kuan Yi Ming
> Assignee: Ian Clelland
>
> The simplified version of resolveLocalFileSystemURI in the 3.0.0 file plugin doesn't properly check the URI if it's in the tmp or Documents folder and returns FileError.SECURITY_ERROR instead. This doesn't occur in 2.9.0.
> For example, trying to resolve a URI of a video file from using getPicture().
> Calling the following lines in CDVFile.m using the above example:
> {code:java}
> NSLog(@"url path: %@", path);
> NSLog(@"docs path: %@", self.appDocsPath);
> NSLog(@"temp path: %@", self.appTempPath);
> {code}
> returns these:
> url path: /private/var/mobile/Applications/[app id]/tmp//trim.TpPlJN.MOV
> docs path: /var/mobile/Applications/[app id]/Documents
> temp path: /var/mobile/Applications/[app id]/tmp
> Since the security error check uses hasPrefix against self.appDocsPath and self.appTempPath here, it fails the check.
--
This message was sent by Atlassian JIRA
(v6.1#6144)