Closed Bug 1774683 Opened 2 years ago Closed 2 years ago

Bookmark shortcut creation by dragging to Windows File Explorer and dropping is partially broken

Categories

(Firefox :: File Handling, defect)

Firefox 102
Desktop
Windows 10
defect
Points:
1

Tracking

()

VERIFIED FIXED
103 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 103+ verified
firefox101 --- unaffected
firefox102 + verified
firefox103 --- verified

People

(Reporter: CKOTTMozillaBugzilla, Assigned: enndeakin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

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

Steps to reproduce:

Example 1: Navigate to https://github.com/LibreCAD/LibreCAD, left-click and hold on padlock icon in URL bar, drag to File Explorer, release the mouse button.

Example 2: Navigate to https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper, left-click and hold on padlock icon in URL bar, drag to File Explorer, release the mouse button.

Example 3: Navigate to https://www.google.com/, left-click and hold on padlock icon in URL bar, drag to File Explorer, release the mouse button.

Actual results:

Example 1: A folder named "LibreCAD" is created, and a zero-byte file named "LibreCAD" is created inside of the folder.

Example 2: Windows returns an error message: "Error Moving File or Folder/The filename, directory name, or volume label syntax is incorrect."

Example 3: A normal bookmark shortcut is created.

Expected results:

Normal bookmark shortcuts should have been created in all three examples.

It seems like the Firefox code for generating bookmark shortcut filenames from web page titles is not handling certain characters prohibited by Windows correctly.

Affected system:

  • Windows 10 Home 21H1 (OS Build 19043.1766)
  • Running as admin did not fix the problem.
  • System reboot did not fix the problem.

Tested in Chrome: No problems.

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

Component: Untriaged → Widget: Win32
Product: Firefox → Core

[Tracking Requested - why for this release]:Drag and drop of padlock creates broken internet shortcut

Regression window :
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=b32ccff079ea010ad4adc466d76b6e99552fee58&tochange=b91422aa4ba10c7068a0b941f382d4c2ff423400

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Component: Widget: Win32 → File Handling
Ever confirmed: true
Keywords: regression
OS: Unspecified → Windows 10
Product: Core → Firefox
Regressed by: 1746052
Hardware: Unspecified → Desktop

:enndeakin, since you are the author of the regressor, bug 1746052, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(enndeakin)
Assignee: nobody → enndeakin
Flags: needinfo?(enndeakin)
Points: --- → 1

Looks like the validation got lost when 1746052 was implemented.

Pushed by neil@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/348482297427
use ValidateFilenameForSaving to validate dropped links on Windows, r=mhowell
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
Flags: qe-verify+

Please nominate this for ESR102 approval when you get a chance.

Flags: needinfo?(enndeakin)

Comment on attachment 9282025 [details]
Bug 1774683, use ValidateFilenameForSaving to validate dropped links on Windows, r=mhowell

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Dragging a link or image to the desktop where the filename contains invalid characters fails to drop the file. This is a regression.
  • User impact if declined: The image does not drop on the desktop with no explanation as to why.
  • Fix Landed on Version: 103
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): - Adds back functionality which was inadvertently removed.
  • Windows only.
Flags: needinfo?(enndeakin)
Attachment #9282025 - Flags: approval-mozilla-esr102?

Comment on attachment 9282025 [details]
Bug 1774683, use ValidateFilenameForSaving to validate dropped links on Windows, r=mhowell

Approved for 102.1esr.

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

Reproduced the issues following the STR from Comment 0 on an affected Nightly build from 2022-06-16, on Win 10 x64.

Verified as fixed on Firefox 102.1.0esr (20220630021511 - treeherder) and Firefox 103.0b3 (20220629170104 - treeherder) on Win 10. The shortcuts are created in all three examples.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

Could we get this into a dot release maybe?

Honestly I don't think this fix can wait for the 103 release, and the fix for this should should be released as soon as possible (IMO, this alone should warrant a 102.1 release).

As a short-term workaround, users could pre-sanitize page titles before dragging using an add-on or script. I posted an example bookmarklet here (not a pretty interface, but it's just for a week or two I assume):

https://www.jeffersonscher.com/res/sumomarklets.html#saniTitle

Neil, could you request uplift to mozilla-release? Thanks

Flags: needinfo?(enndeakin)

Comment on attachment 9282025 [details]
Bug 1774683, use ValidateFilenameForSaving to validate dropped links on Windows, r=mhowell

Approved for 102.0.1.

Attachment #9282025 - Flags: approval-mozilla-release+

I've reproduced the issue on an affected Nightly build, 103.0a1 (20220616093051), with STR from comment 0.

The issue is verified as fixed on 102.0.1-build1 as well, running Win 10 x64.

What about x86 version? I have 102.0 (32 bits) version. Cannot update because it's a last version. This issue is not fixed.

Flags: needinfo?(enndeakin)

102.0.1 (32 bits) - bug fixed!

fixed for most places, but I re-encountered the bug on 102.01 (64-bit)

top.document.title = "わひこ@C100土曜西さ13a on Twitter: "GHost9Solidのノウハウを生かした次回作案②「血〇〇法」、発覚されていない状態で敵に近づき特定のボタンを押すと血〇〇法のモーションが発動、首筋に柔らかい感触を感じ敵は××されてしまう https://t.co/gM552Fqmza\" / Twitter"

also found with
top.document.title = " "GHd触を感じ敵は××されてしまう https://t.co/gza\" / Tr----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"

Seems to be related to title length.

Encountered on this twitter post (light nsfw) https://twitter.com/wahiko94/status/991253919534755840

(In reply to tettee.green from comment #37)

The formatting ate some of the backslashes on the inner quotes.
top.document.title = " \"GHd触を感じ敵は××されてしまう https://t.co/gza\" / Tr----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"

(In reply to tettee.green from comment #37)

fixed for most places, but I re-encountered the bug on 102.01 (64-bit)

Please file a separate bug with this information. Tracking another fix in the same bug causes confusion and likely causes missed release branches in terms of uplift.

(and for reference, bugzilla uses markdown, similar to github - you can enclose stuff in fences, ie triple backtick (`), to ensure no formatting is lost.)

Flags: needinfo?(tettee.green)

(In reply to :Gijs (he/him) from comment #39)

(In reply to tettee.green from comment #37)
Please file a separate bug with this information. Tracking another fix in the same bug causes confusion and likely causes missed release branches in terms of uplift.
Done! https://bugzilla.mozilla.org/show_bug.cgi?id=1779128

Flags: needinfo?(tettee.green)
Flags: in-qa-testsuite+
See Also: → 1783426
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: