Closed Bug 1685881 Opened 4 years ago Closed 4 years ago

Tab crash when view-source: request is modified by webRequest.StreamFilter.write()

Categories

(WebExtensions :: Request Handling, defect)

Firefox 84
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1678734

People

(Reporter: aaron.j.papp, Unassigned)

References

Details

Attachments

(1 file)

37.08 KB, application/x-zip-compressed
Details
Attached file Sample.zip

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

I can reproduce by following these steps:

  1. Go to about:debugging#/runtime/this-firefox
  2. User "Load temporary Add-on..." to load the sample extension attached.
  3. Paste view-source:https://www.example.com/ in the address bar and press Enter

When webRequest.StreamFilter.write() is used in a browser.webRequest.onHeadersReceived listener to modify response content, view-source: requests crash the tab.

Actual results:

The tab crashes.

Expected results:

The tab shouldn't crash; also, one of the following:

  1. The response is successfully modified.
  2. The response is not modified and a catch-able error is thrown.

Or alternatively, have some way to filter out or discern view-source: requests in webRequest handlers or the details object passed to the handler.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Request Handling
Product: Firefox → WebExtensions

Hello,

I’ve managed to reproduce the issue only on the latest Release (84.0.2/20210105180113) under Windows 10 x64 and Ubuntu 16.04 LTS. The latest Nightly and Beta are unaffected by this.

As mentioned in the report, the tab crashes as soon as view-source:https://www.example.com/ is input in the address bar and the Enter key is pressed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

view-source: crash was fixed by bug 1678734

There is a feature request to help with detecting view-source requests at bug 1683646

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
See Also: → 1683646
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: