Closed Bug 1779135 Opened 2 years ago Closed 2 years ago

Desktop Firefox strips file extensions when downloading Android APK files

Categories

(Firefox :: Downloads Panel, defect)

Firefox 102
Desktop
Windows 10
defect

Tracking

()

VERIFIED DUPLICATE of bug 1773907
Tracking Status
firefox103 --- verified
firefox104 --- verified

People

(Reporter: archon810, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug)

Steps to reproduce:

Visit apkmirror.com and try to download any file in desktop Firefox (none of the other browsers, including mobile Firefox, are affected).
For example: https://www.apkmirror.com/apk/google-inc/gmail/gmail-2022-06-12-459360300-release-release/gmail-2022-06-12-459360300-release-2-android-apk-download/.

The file will download and Firefox will strip its .apk extension for an unknown reason. This didn't used to happen and doesn't happen on any other browser. For example, in this case, the file is downloaded as com.google.android.gm_2022.06.12.459360300.Release-63331072_minAPI23(arm64-v8a,armeabi-v7a,x86,x86_64)(nodpi)_apkmirror.com instead of com.google.android.gm_2022.06.12.459360300.Release-63331072_minAPI23(arm64-v8a,armeabi-v7a,x86,x86_64)(nodpi)_apkmirror.com.apk.

Actual results:

File lost extension.

Expected results:

File keeps .apk extension.

The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Product: Firefox → WebExtensions

Sample redirect response (the link will expire due to the verify parameter validation, but you can always get a fresh one above):

HTTP/3 302 Found
date: Tue, 12 Jul 2022 01:14:17 GMT
content-type: text/html; charset=UTF-8
location: https://www.apkmirror.com/wp-content/uploads/2022/07/48/62c789ebc5ecd/com.google.android.gm_2022.06.12.459360300.Release-63331072_minAPI23(arm64-v8a,armeabi-v7a,x86,x86_64)(nodpi)_apkmirror.com.apk?verify=1657588157-ge4vvynO0rYWNLbwempxQJwdlHsSvuuPqComkO9mh6w
x-powered-by: PHP/7.4.29
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
sever-int: AP-apache
server-hostname: nexus2
server-ext: AP-nginx
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 7295ebd58f6b9464-SJC
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400

As you can see, the redirect location has a file extension.

Component: Untriaged → Downloads Panel
OS: Unspecified → Windows 10
Product: WebExtensions → Firefox
Hardware: Unspecified → Desktop
Blocks: 1778322

From what I can tell in https://bugzilla.mozilla.org/show_bug.cgi?id=1773907, this is a known bug in Firefox 102, and a solution was merged today https://hg.mozilla.org/integration/autoland/rev/ed5f1dbedf55 but will only land in 104, is that right?

Are there any mitigation steps before 104 hits stable?

Looks like it was approved for 103 as well.

I reproduced on 103 early betas and it's fixed on 103 beta 8 so I think this is a straight dupe of bug 1773907. The issue was caused by the querystring in the download location (shown in the redirect headers in comment #3).

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE

Reproduced the issue on Win10 using Beta 102.0b1(20220530132252) new profile.

Verified as fixed on Win10/Mac10.13/Ubuntu20.4 using builds Beta 103.0b8 (20220712185923) and Nightly 104.0a1(20220712215641).
Marking issue as verified -fixed based on fixes from bug 1773907.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.