javascript: bookmarklets no longer work after disallowInheritPrincipal bug 1466801

RESOLVED FIXED in Firefox 63

Status

()

defect
P1
normal
RESOLVED FIXED
8 months ago
8 months ago

People

(Reporter: cpeterson, Assigned: jkt)

Tracking

({regression})

unspecified
Firefox 63
Points:
---

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox61 unaffected, firefox62 unaffected, firefox63+ fixed)

Details

(Whiteboard: [fxsearch])

Attachments

(1 attachment)

(Reporter)

Description

8 months ago
[Tracking Requested - why for this release]:

This is a functionality regression in 63 Nightly. I bisected this regression to the following pushlog, which points to disallowInheritPrincipal bug 1466801:

https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=9112406a54a2d3806112111620f25267203a992e&tochange=b5e9fdddf12e598962d6282a4b053aa66b7aabda

STR:
1. Install a javascript: bookmarklet, such as this Hacker News bookmarklet to submit links to Hacker News, by dragging it to your bookmarks toolbar:
https://news.ycombinator.com/bookmarklet.html

2. Click the Hacker News bookmarklet.

EXPECTED RESULT:
Hacker News' link submission page should be opened.

ACTUAL RESULT:
Nothing happens.
(Reporter)

Comment 1

8 months ago
This bug is a regression from disallowInheritPrincipal bug 1466801.
Blocks: 1466801
(Assignee)

Updated

8 months ago
Assignee: nobody → jkt

Updated

8 months ago
Duplicate of this bug: 1483407

Comment 4

8 months ago
FWIW, they still work when you execute them using the custom keyword, if any. However, if you try to execute them using the keyword and pressing Alt+Enter to open them in a new tab, they don't work. Open the new tab first, and then execute it using the keyword as a temporary workaround.
Priority: -- → P1
Whiteboard: [fxsearch]
(In reply to Jan Moesen from comment #4)
> FWIW, they still work when you execute them using the custom keyword, if
> any. However, if you try to execute them using the keyword and pressing
> Alt+Enter to open them in a new tab, they don't work. Open the new tab
> first, and then execute it using the keyword as a temporary workaround.

Please file that as a separate bug under the address bar. Keywords work differently to bookmarks on the toolbar.
(In reply to Jonathan Kingston [:jkt] (Away until 20th Aug) from comment #2)
> Created attachment 8999879 [details]
> Bug 1483148 - Add allowInheritPrincipal to current tab bookmarklets.

Why only the current tab? As far as I can tell, the use case for middle-clicking a javascript bookmarklet on the toolbar is still broken.
Flags: needinfo?(jkt)

Comment 7

8 months ago
Filed bug 1484741.

Comment 8

8 months ago
Comment on attachment 8999879 [details]
Bug 1483148 - Add allowInheritPrincipal to current tab bookmarklets.

:Gijs (he/him) has approved the revision.
Attachment #8999879 - Flags: review+
(Assignee)

Comment 9

8 months ago
> Why only the current tab? As far as I can tell, the use case for middle-clicking a javascript bookmarklet on the toolbar is still broken.

From my testing it only is needed when it is applying to the current document rather than creating it's own document. However I will double check tomorrow. Also perhaps we can just use the document principal in this case instead.
Flags: needinfo?(jkt)

Comment 10

8 months ago
Pushed by jkingston@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8d88272387d1
Add allowInheritPrincipal to current tab bookmarklets. r=Gijs

Comment 11

8 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8d88272387d1
Status: NEW → RESOLVED
Last Resolved: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in before you can comment on or make changes to this bug.