XHR requests sending "null" Origin from addon background script
Categories
(WebExtensions :: Request Handling, defect)
Tracking
(Not tracked)
People
(Reporter: anoakie, Unassigned)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:73.0) Gecko/20100101 Firefox/73.0
Steps to reproduce:
I attempted to make an XMLHttpRequest to one of our APIs from a persistent background script in our Firefox Addon and I unexpectedly got an error because of a "null" Origin. I'm also able to reproduce this with the fetch() API.
Minimal test case attached.
Actual results:
"Origin: null" was sent in the header.
The following error occurred:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://events-api.mix.com/v1/t. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘null’).
Expected results:
"Origin: moz-extension://HASH" should have been sent in the header
No error should have occurred
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
Reproduced the issue on latest Firefox Nightly 74.0a1 (2020-01-09) (64-bit) and Beta 73.0b2 (64-bit) on Windows 10 x64.
This seems like a recent regression, it works well on the latest Release 72.0.1 (64-bit).
Attached screenshots for reference.
Thanks for the report anoakie!
Comment 3•5 years ago
|
||
Comment 4•5 years ago
|
||
Comment 5•5 years ago
|
||
Ah, this seems like a Duplicate of Bug 1607154.
Regression range found using this testcase: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=0f6958f498427fad830cdf94e279d8acd16402c9&tochange=f09f24f2b545919ab0db4bd352c276779c58bcc6
Regression range contains Bug 1405971 which causes this issue.
Closing it as duplicate.
Comment 6•5 years ago
|
||
Sorry for the spam, forgot to correct component.
Updated•5 years ago
|
Description
•