Open
Bug 1683359
Opened 5 years ago
Updated 4 years ago
Unnest or reject nested view-source: scheme at network layer
Categories
(Core :: Networking, defect, P3)
Core
Networking
Tracking
()
NEW
People
(Reporter: robwu, Unassigned)
Details
(Whiteboard: [necko-triaged])
Nested view-source URLs, e.g. view-source:view-source:http://example.com/
aren't really supported. For example, if I type it try to navigate to it from the location bar, Firefox tries to search for it with the default search engine instead of navigating to it. The console shows "NS_ERROR_FAILURE: Prevent view-source recursion" (introduced in bug 1295002).
It's however still possible to try and open a nested view-source:
-URL, for example through extensions. Instead of trying to get all consumers to reject nested view-source:-URLs, it would be nice if this was done at the network/protocol handler layer.
STR:
- Open the global JS console and run:
gBrowser.selectedTab = gBrowser.addTab("view-source:view-source:http://example.com/", { triggeringPrincipal: document.nodePrincipal });
- Look at the tab and the console.
Expected:
- Should display the source, optionally by having rewritten the URL to
view-source:http://example.com/
- No errors in the console.
Actual:
- Tab is stuck loading
- Console shows
NS_ERROR_FAILURE: Prevent view-source recursion
- On debug builds I'm getting an assertion failure:
Assertion failure: !mPromise.IsEmpty()
, atnetwerk/protocol/http/HttpChannelParent.cpp:974
Comment 1•5 years ago
|
||
Set this to P3. If you think this is important, feel free to adjust the priority.
Severity: -- → S4
Priority: -- → P3
Whiteboard: [necko-triaged]
Comment hidden (off-topic) |
Comment hidden (off-topic) |
You need to log in
before you can comment on or make changes to this bug.
Description
•