HTML preview of response is affected by the netmonitor's CSP
Categories
(DevTools :: Netmonitor, defect, P2)
Tracking
(firefox-esr128 unaffected, firefox137 wontfix, firefox138 fixed, firefox139 fixed)
Tracking | Status | |
---|---|---|
firefox-esr128 | --- | unaffected |
firefox137 | --- | wontfix |
firefox138 | --- | fixed |
firefox139 | --- | fixed |
People
(Reporter: pesek.kamil, Assigned: tschuster)
References
(Regression)
Details
(Keywords: regression)
Attachments
(4 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Steps to reproduce:
I want to see HTML response in Developer Tools -> Network -> Select request -> Response -> HTML preview.
I believe it stopped working max month ago. It's similar problem which was there previously https://bugzilla.mozilla.org/show_bug.cgi?id=1804232
Actual results:
HTML is not shown correctly, sometimes nothing is shown (probably when there is more complex HTML or CSS), sometimes just part is shown but without any details.
Expected results:
Correct HTML preview should be shown, as previously.
Reporter | ||
Comment 1•22 days ago
|
||
Reporter | ||
Comment 2•22 days ago
|
||
Comment on attachment 9475640 [details]
error.html
This is debug message generated by PHP framework Symfony
Comment 3•22 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Netmonitor' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 4•22 days ago
|
||
Hello Kamil, thanks for the report.
Would you be able to run https://mozilla.github.io/mozregression/ and report the results here so we know when it regressed?
Assignee | ||
Comment 6•22 days ago
|
||
This is caused by D238046 apparently we are rendering the response using an iframe with a data: URL inside the web console. netmonitor/index.html
now has a CSP that blocks most styles/images etc.
We really should not be rendering this untrusted HTML directly inside the devtools. I think for similar cases inside the browser (like the sidebar) we would usually use a <browser>
element.
Assignee | ||
Comment 7•22 days ago
|
||
To make uplifts easier we probably need to remove the CSP in 137/138.
Assignee | ||
Updated•22 days ago
|
Assignee | ||
Updated•22 days ago
|
Assignee | ||
Updated•22 days ago
|
Assignee | ||
Updated•22 days ago
|
Assignee | ||
Updated•22 days ago
|
Assignee | ||
Updated•21 days ago
|
Comment hidden (obsolete) |
Assignee | ||
Updated•21 days ago
|
Assignee | ||
Comment 10•21 days ago
|
||
This partially reverts D238046.
Updated•21 days ago
|
Assignee | ||
Comment 11•21 days ago
|
||
Updated•21 days ago
|
Comment 12•21 days ago
|
||
Set release status flags based on info from the regressing bug 1943360
Comment 13•20 days ago
|
||
Tom, do you think we should move the second patch to another bug so that we can close this one once the regression is fixed and uplifted?
Assignee | ||
Comment 14•20 days ago
•
|
||
(In reply to Julian Descottes [:jdescottes] from comment #13)
Tom, do you think we should move the second patch to another bug so that we can close this one once the regression is fixed and uplifted?
I actually think it's easier to track everything in one bug. We have release specific tracking flags, and the Beta (and maybe Release) patch is basically just a backout.
Assignee | ||
Comment 15•20 days ago
|
||
Comment on attachment 9475978 [details]
Bug 1957333 - Beta: Remove CSP from Netmonitor. r?#devtools-reviewers
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: The HTML preview in the Devtools Network Monitor doesn't use CSS stylesheets, images etc. So this only matters to web developers.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This is essentially just a backout.
- String changes made/needed:
- Is Android affected?: No
Assignee | ||
Comment 16•20 days ago
|
||
In D243788 I am adding a test that covers this problem.
Updated•20 days ago
|
Updated•19 days ago
|
Updated•15 days ago
|
Comment 17•15 days ago
•
|
||
Approved for 138.0b5 (fixed by backout). This reverts part of bug 1943360 but remains in 139 which should be fixed by D243788.
Tom , whats the eta in landing that patch for 139?
Comment 18•14 days ago
|
||
uplift |
Updated•14 days ago
|
Comment 19•14 days ago
|
||
Assignee | ||
Comment 20•14 days ago
|
||
Tom , whats the eta in landing that patch for 139?
Just landed now.
Comment 21•14 days ago
|
||
bugherder |
Updated•7 days ago
|
Description
•