Skip to content

DocumentStorageProvider throws java.lang.SecurityException #6884

Description

@jmue

The DocumentStorageProvider throws a SecurityException while opening thumbnails from apps other than the android own files app:

java.lang.SecurityException: Permission Denial: reading com.owncloud.android.providers.DiskLruImageCacheFileProvider uri content://org.nextcloud.imageCache.provider/Test/Nextcloud.png from pid=32321, uid=10138 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs

Steps to reproduce:

  1. Use Material Files app v1.1.2 and add one of our nextcloud folders as external storage.
  2. Browse the folder within the app.
  3. For images the SecurityException exception is raised and no thumbnails are shown.

The problem here is that our DiskLruImageCacheFileProvider is called with the pid of the calling app.

One solution is to use the ThumbnailsCacheManager directly (as we did for thumbnail generation request) and copy the lines of DiskLruImageCacheFileProvider.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions