"Add new rule" is blocked by CSP
Categories
(DevTools :: Inspector: Rules, defect)
Tracking
(firefox-esr102 wontfix, firefox106 wontfix, firefox107 wontfix, firefox108 wontfix, firefox109 verified)
People
(Reporter: tobias.bengfort, Assigned: jdescottes)
References
(Blocks 1 open bug, )
Details
(Keywords: regressionwindow-wanted)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0
Steps to reproduce:
- Go to http://vosteran.com
- Open inspector
- Click the '+' icon next to 'Filter Styles'
Actual results:
- An empty <style> tag is added just before the closing html tag.
- The rule does not appear in the rules panel
- An error is logged: Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”).
Expected results:
The rule should be created
Reporter | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Thanks for the report, I couldn't reproduce on the website mentioned in the summary, but the test page from Bug 1228985 shows the issue:
https://bug1228985.bmoattachments.org/attachment.cgi?id=9149557
STRs:
- open https://bug1228985.bmoattachments.org/attachment.cgi?id=9149557
- open DevTools > Inspector
- click on + in the Rule View
ER:
A new rule should be created.
AR:
No new rule created.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
The oldest Firefox version that I manged to run without crashing (92) already had this bug. So probably not a recent regression.
Comment 3•2 years ago
|
||
I was able to reproduce this issue and get a regression range but it seems our tool couldnt bisect more builds and this is the best we could do:
7:48.44 INFO: Last good revision: 2da6d806f45732e169fd8e7ea9a9761fa7fed93d (2021-03-25)
7:48.44 INFO: First bad revision: 55c63a6c547f1fecd412505a064f21fd1e1ec48e (2021-03-26)
7:48.44 INFO: Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2da6d806f45732e169fd8e7ea9a9761fa7fed93d&tochange=55c63a6c547f1fecd412505a064f21fd1e1ec48e
Hopefully one of our devs can take a look and might identify what is causing this.
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Great work. I am pretty sure this was caused by "Bug 1685268 - Enable STYLESHEET resource type by default". Looking at the code here: https://searchfox.org/mozilla-central/source/devtools/server/actors/page-style.js#1162-1177 We can see that getStyleElement
is never called, which contains the code added Bug 1228985 to fix this bug.
Assignee | ||
Comment 5•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
Thanks for the regression window and for the investigation! We still have 2 codepaths for stylesheet management, but we should soon only have one.
Let's fix the regression and add a test.
Assignee | ||
Updated•2 years ago
|
Comment 8•2 years ago
|
||
bugherder |
Comment 9•2 years ago
|
||
Verified as fixed in our latest build 109.0a1 (2022-11-14).
Updated•2 years ago
|
Comment 10•2 years ago
|
||
The patch landed in nightly and beta is affected.
:jdescottes, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox108
towontfix
.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 11•2 years ago
|
||
Not a recent regression, this can ride the trains.
Description
•