Closed Bug 780949 Opened 13 years ago Closed 11 years ago

"Save target as" tries to download non-existent file if a filename is highlighted

Categories

(Firefox :: Menus, defect)

14 Branch
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: u445064, Unassigned)

Details

Attachments

(2 files)

Attached image contextmenu.png
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1 Build ID: 20120713134347 Steps to reproduce: Look for any filename on a webpage that doesn't link to an actual file. For example, open http://gmer.net and scroll down to "Version History 1.0.3". Now highlight "NTVDM.EXE" and open the context menu. Actual results: Firefox offers "Save target as" although there is no target to save. If you click "Save target as", Firefox displays an error message box: "The download cannot be saved, because an unknown error occured. Please try again." Expected results: Firefox should not display the "Save target as" option if selected text contains a filename which doesn't refer to an actual file.
Attached image Error message box
OS: Windows 7 → All
Hardware: x86 → All
confirming with Firefox14.0.1
Status: UNCONFIRMED → NEW
Component: Untriaged → Menus
Ever confirmed: true
Changeset: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ecaad3ae9964&tochange=e94edfdb1f5b Suspected bug: Chad Freeman — Bug 720023 - Context menus for selected domains should be the identical as for links. r=jwein Anyway I think this bug is invalid, it's the normal behavior. In your example, NTVDM.EXE is treated as a domain.
Blocks: 720023
Keywords: regression
But Bug 720023 talks about misleading domain names - like bob.com which can be detected as a) a domain name (here the option "new tab" may be functional) or b) as a file with filename bob.com Since .EXE is neither an TLD nor part of a link, the "tab" options must not be displayed. Beyond that, as Firefox detects "NTVDM.EXE" as a filename, the option "Save target as" must not be displayed in the context menu as this is plain text and not a file link.
It's not a new behavior in Firefox. Try with an old version like Firefox 8, select "NTVDM.EXE" and right click: you'll see the context menu displays the 3 options "Open Link" even if it's not a valid link. So I think "Save target as" has been added to extend thisprevious behavior.
"So I think "Save target as" has been added to extend thisprevious behavior." I don't understand why Firefox devs should increase the level of confusion. A link may be clickable or not and even if Firefox misunderstands something highlighted as a domain, this is not the particular fact I want to mention. Can you tell me a valid testcase where "Save target as" operates as expected if highlighted text ist just "plain text" without reference to an actual file?
show_bug.cgi ## test
robots.txt ## test
See, "robots.txt" offers "Save target as" where "show_bug.cgi" doesn't. But both are present in the root dir of https://bugzilla.mozilla.org/ .
No longer blocks: 720023
Group: core-security
CC list accessible: false
Not accessible to reporter
Group: core-security
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Group: core-security
Keywords: regression
Group: core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: