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)

defect

Tracking

()

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:

  1. Open the global JS console and run: gBrowser.selectedTab = gBrowser.addTab("view-source:view-source:http://example.com/", { triggeringPrincipal: document.nodePrincipal });
  2. 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:

Set this to P3. If you think this is important, feel free to adjust the priority.

Severity: -- → S4
Priority: -- → P3
Whiteboard: [necko-triaged]
You need to log in before you can comment on or make changes to this bug.