-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
Description
Describe the bug
When using IStorageFolder::GetFolderAsync
and IStorageFolder::GetFileAsync
, the returned storage items don't pass in the SecurityScopedAncestorUrl
. It then defaults to the child item path, which is incorrect. This prevents accessing child items from folders outside the app sandbox.
All other operations pass in the SecurityScopedAncestorUrl
when accessing child items.
public Task<IStorageFolder?> GetFolderAsync(string name)
{
var url = GetItem(name, true);
return Task.FromResult<IStorageFolder?>(url is null ? null : new IOSStorageFolder(url));
}
public Task<IStorageFile?> GetFileAsync(string name)
{
var url = GetItem(name, false);
return Task.FromResult<IStorageFile?>(url is null ? null : new IOSStorageFile(url));
}
To Reproduce
- Use a directory picker to access a folder outside the app sandbox.
- Programatically access a child directory or file of the selected folder.
- Attempt to read/write to that child directory or file. It should fail.
Expected behavior
No response
Avalonia version
11.3.4
OS
iOS
Additional context
No response