Closed Bug 1670356 Opened 6 years ago Closed 5 years ago

[Windows] Duplicate lowercase extension appended to executable downloads with uppercase extension

Categories

(Firefox :: File Handling, defect, P2)

Firefox 81
Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
84 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- wontfix
firefox82 --- wontfix
firefox83 --- verified
firefox84 --- verified

People

(Reporter: sdl, Assigned: Gijs)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

Downloading files with an uppercase extension (e.g. "EXE") results in a duplicate lowercase extension being appended to the download (e.g. "exe"). For example, if a user downloads "PROGRAM.EXE", Firefox will save it as "PROGRAM.EXE.exe".

This is a regression which appears to have been introduced in Firefox 81.0.

A sample URL to try:
https://download.microsoft.com/download/8/1/9/819227B2-B066-41CC-9EF9-5426F0F0F886/IE11_BlockerToolkit.EXE

Actual results:

Download has a duplicate lowercase extension appended.

Expected results:

File extension is preserved as-is by default.

Status: UNCONFIRMED → NEW
Component: Untriaged → File Handling
Ever confirmed: true
Keywords: regression
Regressed by: 1655457
Has Regression Range: --- → yes

Sigh.

Flags: needinfo?(gijskruitbosch+bugs)
Severity: -- → S3
Priority: -- → P2
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(gijskruitbosch+bugs)
OS: Unspecified → Windows
Hardware: Unspecified → Desktop
Summary: Duplicate lowercase extension appended to downloads with uppercase extension → Duplicate lowercase extension appended to executable downloads with uppercase extension

This is Windows-specific, and the culprit is https://searchfox.org/mozilla-central/rev/40b561b9accbff54387edcba2b8b4a3c3828110e/toolkit/mozapps/downloads/HelperAppDlg.jsm#469,479 ; I missed this despite explicitly checking for a case like this when fixing bug 1655457 because the code is both specific to Windows and to executables (and, as the other bug was about PDFs, I probably tested with pdfs)...

Summary: Duplicate lowercase extension appended to executable downloads with uppercase extension → [Windows] Duplicate lowercase extension appended to executable downloads with uppercase extension
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/81801ba1e2cf use case insensitive comparisons when checking Windows executables, r=mak
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch

Comment on attachment 9182125 [details]
Bug 1670356 - use case insensitive comparisons when checking Windows executables, r?mak

Beta/Release Uplift Approval Request

  • User impact if declined: Broken behaviour for windows users downloading executables with shouty extensions
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): one-line change + automated tests, super early in beta.
  • String changes made/needed: no
Attachment #9182125 - Flags: approval-mozilla-beta?

Comment on attachment 9182125 [details]
Bug 1670356 - use case insensitive comparisons when checking Windows executables, r?mak

Looks safe, approved for 83 beta 3, thanks.

Attachment #9182125 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Reproduced the issue with Firefox 83.0a1 (20201009214545) on Windows 10x64.
The issue is verified fixed with Firefox 84.0a1 (20201022215159) and Firefox 83.0b3 (20201022171613) on Windows 10x64.

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

Attachment

General

Creator:
Created:
Updated:
Size: