Skip to content

Commit 3bb383f

Browse files
committed
openfoodfacts
1 parent aec6cd2 commit 3bb383f

File tree

2 files changed

+48
-5
lines changed

2 files changed

+48
-5
lines changed

_includes/videopages/type1/openpetfoodfacts.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<div class="col s12 tag-div">
1+
<!-- <div class="col s12 tag-div">
22
<div class="user-content">
33
<p>
44
Description of this bug.
55
</p>
66
</div>
7-
</div>
7+
</div> -->
88

99
<!-- <embed src="/assets/res/videos/NoteBuddy_v1.3.2.mp4" autostart="false"/> -->
1010

openpetfoodfacts.md

+46-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,56 @@ layout: page
33
css: ["projects.css"]
44
# js: ["https://cdnjs.cloudflare.com/ajax/libs/geopattern/1.2.3/js/geopattern.min.js", "projects.js"]
55
---
6-
76
---
87

98
| Device Name | Android Version | App Name | App Version |
109
|:--------------------:|:---------------:|:--------------:|:-----------:|
11-
| Samsung Galaxy Note4 | 6.0.1 | EtchDroid | 1.5 |
10+
| Samsung Galaxy Note4 | 6.0.1 | Open Pet Food Facts | 3.2.8 |
11+
12+
---
13+
14+
{% include videopages/type1/openpetfoodfacts.html %}
15+
16+
#### Description
17+
The bug is related to the dangerous permission `android.permission.WRITE_EXTERNAL_STORAGE`. It happens when the app attempts to writing external storage without permission checking (via `checkSelfPermission`).
18+
19+
Reproduce crash
1220

21+
1. grant the storage permission in the system setting
22+
2. scan a product (also need camera permission) and then enter the "add new product" page
23+
3. type any information about the product
24+
4. go to the system setting and revoke the permission
25+
5. in the app, tape twice the "next" botton and reach the "nutrition facts" tab
26+
6. click "add this product" and then the app crashes
27+
28+
#### Aper Outputs
29+
30+
```
31+
API:
32+
<android.os.Environment: java.io.File getExternalStorageDirectory()>
33+
---
34+
PERMISSIONS:
35+
[android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE]
1336
---
37+
CALLCHAIN:
38+
openfoodfacts.github.scrachx.openfood.views.g1.onClick(android.content.DialogInterface,int)void
39+
openfoodfacts.github.scrachx.openfood.views.MainActivity.a(java.util.ArrayList,boolean,android.widget.EditText,java.lang.String,android.content.DialogInterface,int)void
40+
openfoodfacts.github.scrachx.openfood.utils.r.a(android.content.Context,android.net.Uri)java.lang.String
41+
openfoodfacts.github.scrachx.openfood.utils.r.c(android.content.Context,android.net.Uri)java.lang.String
42+
android.os.Environment.getExternalStorageDirectory()java.io.File
1443
15-
{% include videopages/type1/openpetfoodfacts.html %}
44+
======
45+
46+
DANGEROUS: android.permission.READ_EXTERNAL_STORAGE
47+
Is Declared: true
48+
Check Sites: NONE
49+
Request Sites: NONE
50+
Has Handle: in <openfoodfacts.github.scrachx.openfood.views.MainActivity: void onRequestPermissionsResult(int,java.lang.String[],int[])>
51+
52+
---
53+
DANGEROUS: android.permission.WRITE_EXTERNAL_STORAGE
54+
Is Declared: true
55+
Check Sites: NONE
56+
Request Sites: NONE
57+
Has Handle: in <openfoodfacts.github.scrachx.openfood.views.MainActivity: void onRequestPermissionsResult(int,java.lang.String[],int[])>
58+
```

0 commit comments

Comments
 (0)