Closed Bug 1777743 Opened 3 years ago Closed 3 years ago

Dragging URL to make shortcut creates malformed file

Categories

(Firefox :: Untriaged, defect)

Firefox 102
defect

Tracking

()

RESOLVED DUPLICATE of bug 1774683

People

(Reporter: tettee.green, Unassigned)

Details

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

Steps to reproduce:

OS: Windows 7

  1. Go to a URL that has characters in the title like : / "
    (e.g. tweets with media in them, the window title has https://t.co in it, and also quotes)
    (alternatively you can manually change the title in the browser console with top.document.title = "sup/hey/ho/oh no:";)
  2. Select all of the URL
  3. drag to your desktop or another folder as you would to create a shortcut to that URL

Actual results:

If the site's title contains ' : ', the file's title will be cut at that point and the file will contain no data.
This can result in the filename ending in a space, making it difficult to delete on my operating system.
It can also result in the creation of a blank folder instead.

If the site's title contains / and potentially ", a messagebox pops up with the message
"[folder path][partial site title] is not accessible. The filename, directory name, or volume label syntax is incorrect."
This messagebox doesn't pop up if a file was created, but it may still pop up if a folder is created.

(As a current workaround I have made a bookmarklet to replace the problematic characters in the title)

Given that this can create folder paths on my computer I marked it as a security issue, however I cannot manage to do anything other than making folders, blank files, and shortcuts.

Expected results:

A shortcut (.lnk file) should've been created with the window title as the filename (albiet with problematic characters removed or replaced, as happened in past versions), with the file acting as a shortcut to the URL. It should not create any folders.

Also, when attempting to make a shortcut that already exists, explorer.exe crashes and restarts itself.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Group: firefox-core-security
You need to log in before you can comment on or make changes to this bug.