filterResponseData completely corrupting webpages content encoding
Categories
(WebExtensions :: Request Handling, defect, P1)
Tracking
(firefox-esr68 unaffected, firefox70 unaffected, firefox71 unaffected, firefox72 verified)
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox70 | --- | unaffected |
firefox71 | --- | unaffected |
firefox72 | --- | verified |
People
(Reporter: particlecore, Assigned: mattwoodrow)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
This issue is present in Nightly 72.0a1 (2019-10-23)
Implement filterResponseData with and without any modification to the stream itself.
Example test extension example attached to verify the issue.
Install it and then open youtube.com.
Actual results:
The page Content Encoding gets completely corrupted
See the following issue for more reports from extension users: https://github.com/ParticleCore/Iridium/issues/788
Expected results:
The page should not become corrupted and any modifications done to the stream should go through without issues.
Comment 1•5 years ago
|
||
Managed to reproduce using STR on Windows 10 Pro x 64 bit and macOS catalina 10.15 only On Nightly browser, tested on Nightly 72.0a1 (20191024214023 & 20191025095546).
Also tested using the link from 1587960, https://www.youtube.com/watch?v=YzbARjL1o-s, and the a "Content encoding error" is shown.
Comment 2•5 years ago
|
||
Miruna, could you validate whether this is the same problem with the info I posted in bug 1587960 comment 6? I'm actually unable to reproduce this bug right now.
Comment 3•5 years ago
|
||
I updated an now I can reproduce the problem. This is not related to bug 1587960.
When I updated I noticed an update to ICU 65 in Bug 1583269, I'm not certain if that is the cause, but it seems it could be related.
Miruna, can you do a mozregression on this?
Updated•5 years ago
|
Comment 4•5 years ago
|
||
I just ran mozregression, and got bug 1583700 as the culprit.
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
Shane, could you please help me with writing a test for this?
Comment 10•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Verified fixed with Windows 10 Pro x 64 bit and macOS catalina 10.15 on Firefox 72.0a1 (20191104214406) and now after loading the test extension and Youtube can be opened successfully.
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Bug 1591809 indicates it's simple to produce using https://github.com/mdn/webextensions-examples/blob/master/http-response/background.js
My guess is that it is the replacing of the data that caused the problem, but I'm not sure. A simple test using a background script similar to that should produce it.
I tried something I thought should fail, but it doesn't. So I'm missing some aspect of what is going on.
https://gist.github.com/mixedpuppy/8698a7d40bda0dd461793a3533011a43
Comment 13•5 years ago
|
||
The actual problem is that gzip encoded content is no longer decompressed before being fed into the ondata handler of the filter which then later triggers an exception when it is being fed into the TextDecoder.
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
Guido, thanks!
Assignee | ||
Updated•5 years ago
|
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•