PassAndroid icon indicating copy to clipboard operation
PassAndroid copied to clipboard

Remove unneeded storage permissions

Open soshial opened this issue 3 years ago • 1 comments

When importing a pkpass file, no storage permission is actually needed, since the pkpass file contents are copied into app private memory anyway.

  1. Tested on Android 11 and 12 -- and it imported pkpass file perfectly WITHOUT storage permission:

https://github.com/ligi/PassAndroid/blob/master/android/src/main/java/org/ligi/passandroid/ui/PassImportActivity.kt#L41

Screenshot 2022-06-26 at 19 22 22
  1. Changing pkpass image could also easily be done without abolute file path: https://github.com/ligi/PassAndroid/blob/master/android/src/main/java/org/ligi/passandroid/ui/edit/ImageEditHelper.kt#L34

Providing an app storage permissions is a dangerous thing and I am incline to never do this, especially when this is so easily avoidable.

soshial avatar Jun 26 '22 16:06 soshial

@ligi

soshial avatar Sep 20 '22 20:09 soshial

As seen in https://github.com/ligi/PassAndroid/issues/434#issuecomment-1525404259 it turns out that permissions might be necessary in order to read and import passports on Android 13

spaetz avatar Apr 27 '23 11:04 spaetz

Thanks - but I also need to fix it for Android 13 - as far as I see #460 is the solution.

ligi avatar May 17 '23 02:05 ligi

Thank you @ligi, v3.7.3 works perfectly on Android 13.

Also, I think this option should be removed on Android 13+ (because it won't ever work on recent Android versions): Screenshot_20230519_204538_PassAndroid

soshial avatar May 19 '23 18:05 soshial