Open Bug 1475201 Opened 6 years ago Updated 2 years ago

Consider removing ability to drag javascript: urls to the new window button

Categories

(Firefox :: Toolbars and Customization, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: jkt, Unassigned)

References

Details

When working on Bug 1466801, I noticed the test was breaking for dragging multiple urls to the new window button if one contained a javascript: url.

browser/base/content/test/general/browser_newWindowDrop.js

Even once I manually changed to permit inherit principal in newWindowButtonObserver and newTabButtonObserver it still didn't work for new windows but did for tabs.

The _handleURIToLoad code is called lazily for new windows, currently this permits the use of inherit principal, so I had to change that also. I would prefer to lock down this function also.

Changing _handleURIToLoad to handle another window argument seems like a lot more complexity just for this behaviour.

Can we consider removing it?
Blocks: 1466801
Flags: needinfo?(arai.unmht)
Priority: -- → P3
Assignee: nobody → jkt
I have no objection :)

for drag-and-drop specifically, we can handle in ContentAreaDropListener:
  https://searchfox.org/mozilla-central/source/dom/base/contentAreaDropListener.js
maybe just filter javascript: URIs out from _addLinksFromItem, or reject it in _validateURI.
Flags: needinfo?(arai.unmht)

See also bug 1506100

Depends on: 1605050

I'm taking care of the new tab button in bug 1605050. Seems like the new window button should be an easy fix as well. jkt, do you want to get back to this?

Flags: needinfo?(jkt)
Summary: Consider removing ability to drag javascript: urls to the new tab and new window button → Consider removing ability to drag javascript: urls to the new window button

Unassigning from me as I'm unlikely to be fixing this. Sorry.

Assignee: jonathan → nobody
Flags: needinfo?(jonathan) → needinfo?(dao+bmo)
Flags: needinfo?(dao+bmo)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.