Closed Bug 1868382 Opened 1 year ago Closed 11 months ago

Cannot open a pdf with Files or gmail apps

Categories

(GeckoView :: PDF Viewer, defect, P1)

All
Android
defect

Tracking

(firefox120 unaffected, firefox121 unaffected, firefox122+ fixed)

RESOLVED FIXED
122 Branch
Tracking Status
firefox120 --- unaffected
firefox121 --- unaffected
firefox122 + fixed

People

(Reporter: calixte, Assigned: calixte)

References

Details

(Keywords: regression)

Attachments

(1 file)

When I try to open a pdf with a Pixel 7 pro from the Files app, Fenix returns a 404.
But it works when I try to open a pdf from Chrome.
I added some logging in:
https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/ContentInputStream.java#115-132
and when the pdf is provided by Files (content://com.google.android.apps.nbu.files.provider...), isExported returns false, when it returns true when opened from Chrome (content://media/external/downloads/...).

Checking if the provider is exported is one of the mitigations proposed here:
https://developer.android.com/privacy-and-security/risks/content-resolver#mitigations_2
After reading this again and again, I can see that there is a "OR" between each possibility.
So here we want to be sure that the user granted the provider and consequently we don't need to check if it's exported.

:olivia, wdyt ?

Flags: needinfo?(ohall)

Some Google apps which are files provider are exported or not, hence checking for
the exported flag is likely too restrictive.
We can only rely on having user agreement to read pdf files on Android devices.

Assignee: nobody → cdenizet
Status: NEW → ASSIGNED

[Tracking Requested - why for this release]: the feature isn't usable

I am sure Calixte will fix it quickly but I would like RM to be aware of this

Keywords: regression
Regressed by: 1864956

Set release status flags based on info from the regressing bug 1864956

Thanks for the background!

After reading this again and again, I can see that there is a "OR" between each possibility.
So here we want to be sure that the user granted the provider and consequently we don't need to check if it's exported.

That makes sense to me too. I'll see if I can find the right reviewer since there are many implications too.

Flags: needinfo?(ohall)
Blocks: 1864956
No longer regressed by: 1864956
Attachment #9367088 - Attachment description: Bug 1868382 - Don't check if a provider is exported to read pdfs in GV r=#geckoview-reviewers → Bug 1868382 - Check if a provider belongs to an allow-list if it isn't exported when reading pdfs in GV r=#geckoview-reviewers

The bug is marked as tracked for firefox122 (nightly). However, the bug still has low severity.

:olivia, could you please increase the severity for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.

For more information, please visit BugBot documentation.

Flags: needinfo?(ohall)
Severity: S3 → S2
Flags: needinfo?(ohall)
Pushed by cdenizet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/638dd51545aa Check if a provider belongs to an allow-list if it isn't exported when reading pdfs in GV r=geckoview-reviewers,owlish
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
Summary: Cannot open a pdf on Pixel 7 with Files app → Cannot open a pdf with Files app
Duplicate of this bug: 1869126
Summary: Cannot open a pdf with Files app → Cannot open a pdf with Files or gmail apps
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: