Closed
Bug 1448740
Opened 7 years ago
Closed 7 years ago
Service worker messages from iFrame have zero-length string origin
Categories
(Core :: DOM: Service Workers, defect, P3)
Tracking
()
RESOLVED
DUPLICATE
of bug 1348082
People
(Reporter: me, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180322152034
Steps to reproduce:
1. Create a page that hosts an iFrame that registers a service worker.
2. Create and register a service worker from the iFrame that logs postMessage event origins.
3. Send a message to the service worker.
Actual results:
The event's origin is a zero-length string.
Expected results:
The event's origin should be set to the sending client's origin.
It looks like mOrigin is never set in https://dxr.mozilla.org/comm-central/source/mozilla/dom/serviceworkers/ServiceWorkerPrivate.cpp#540 - could this be the issue?
Comment 1•7 years ago
|
||
Hi Matthew Slipper,
Can you please download FF Nightly 61.0a1 from here: and retest this issue to see if this is reproducible also with this version.
I'm not very familiar with this service worker but I think the development team from this component can help you. Thanks
Component: Untriaged → DOM: Service Workers
Flags: needinfo?(me)
Product: Firefox → Core
Updated•7 years ago
|
Priority: -- → P3
Comment 2•7 years ago
|
||
Andrew: Verify bug and see if it relates to any other bugs we have.
Flags: needinfo?(bugmail)
Comment 3•7 years ago
|
||
Update for comment 1: Sorry I forgot to add the link from where you can download Nightly: https://nightly.mozilla.org/
Updated•7 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•7 years ago
|
||
This is a known compat bug. See bug 1348082.
Note, the origin should always be the same as `self.origin` since service workers are only allowed to interact with same-origin things. You can use that as a work-around.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(me)
Flags: needinfo?(bugmail)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•