If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

New experimental user interface would not allow Bookmarklets due to CSP

RESOLVED WONTFIX

Status

()

bugzilla.mozilla.org
General
RESOLVED WONTFIX
7 months ago
6 months ago

People

(Reporter: Alice0775 White, Unassigned)

Tracking

(Depends on: 1 bug)

Production
x86
Windows 10
Dependency tree / graph

Details

(Reporter)

Description

7 months ago
New experimental user interface would not allow Bookmarklets due to CSP.
Classic appearance allows to execite Bookmarklets at least.

Steps To Reproduce:
1. Create a bookmark the following URL as Bookmarklets
    javascript:console.log("OK")
2. Make sure "experimental user interface" on
3. Open Bug page such as https://bugzilla.mozilla.org/show_bug.cgi?id=866522
4. Open the bookmark to execute Bookmarklets code


Actual Results:
Web Console shows the following error:

Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://bugzilla.mozilla.org 'nonce-uL1lcqYhvw7qPnNiXc3vZWHCozo2BoXVkw9cw2eamYZXT31v' 'unsafe-inline' 'unsafe-eval'”).  show_bug.cgi


Expected Results:
Web Console should show "OK"
(Reporter)

Updated

7 months ago
Blocks: 1150541
(Reporter)

Comment 1

7 months ago
Ref: http://forums.mozillazine.org/viewtopic.php?p=14735195#p14735195
Some Bookmarklets is necessary to make Bug list in Mozillazine build forum.(Sample Bug List http://forums.mozillazine.org/viewtopic.php?p=14734976#p14734976 )
(In reply to Alice0775 White from comment #1)
> Ref: http://forums.mozillazine.org/viewtopic.php?p=14735195#p14735195
> Some Bookmarklets is necessary to make Bug list in Mozillazine build
> forum.(Sample Bug List
> http://forums.mozillazine.org/viewtopic.php?p=14734976#p14734976 )

Alice, is there another way that Bug list could be assembled for Mozillazine? 

We do have a workaround for CSP but if that list could be generated (through a REST API query, perhaps?) another way, that'd be better.
Flags: needinfo?(alice0775)
(Reporter)

Comment 3

7 months ago
(In reply to Alice0775 White from comment #0)
> New experimental user interface would not allow Bookmarklets due to CSP.
> Classic appearance allows to execite Bookmarklets at least.

Typo

New experimental user interface would not allow Bookmarklets due to CSP.
Old user interface allows to execite Bookmarklets at least.
Flags: needinfo?(alice0775)
(Reporter)

Comment 4

7 months ago
(In reply to Emma Humphries ☕️ [:emceeaich] (UTC-8) +needinfo me from comment #2)
> (In reply to Alice0775 White from comment #1)
> > Ref: http://forums.mozillazine.org/viewtopic.php?p=14735195#p14735195
> > Some Bookmarklets is necessary to make Bug list in Mozillazine build
> > forum.(Sample Bug List
> > http://forums.mozillazine.org/viewtopic.php?p=14734976#p14734976 )
> 
> Alice, is there another way that Bug list could be assembled for
> Mozillazine? 

So far, @Josa makes the list by hand every night...

Comment 5

7 months ago
This seems more like a feature rather than a bug? 

For automated tasks like this the REST API is much more appropriate. If you paste the bookmarket source, I'm sure someone can suggest a <50 line Python script to retrieve the data you're after from the API.

(And for bookmarklets that are used for non-automation tasks (eg working around deficiencies in the UI) then IMO it makes much more sense for people to file bugs and improvements made directly to BMO, rather than having custom scripts/addons/... squirrelled away in developers personal environments).
Because this can be solved using the API, I'm going to WONTFIX.
Status: NEW → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.