Attempting to open some videos in the Picture-in-Picture player results in an all-white player window and SecurityError: The operation is insecure error
Categories
(Toolkit :: Video/Audio Controls, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr60 | --- | unaffected |
| firefox-esr68 | --- | unaffected |
| firefox67 | --- | unaffected |
| firefox68 | --- | unaffected |
| firefox69 | --- | disabled |
| firefox70 | --- | disabled |
| firefox71 | --- | fixed |
People
(Reporter: mconley, Assigned: mconley)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
STR:
- Visit https://www.formulize.org/videos/
- Click "Play" on the slideshow player
- Click the > arrow at the bottom of the player until it gets overtaken by a YouTube video
- Hover the video so that the Picture-in-Picture toggle displays
- Click on the toggle
ER:
The video should open in the Picture-in-Picture player window.
AR:
The player window opens, but only shows white. The following error is displayed in the Browser Console
15:21:07.492 SecurityError: The operation is insecure. PictureInPictureChild.jsm:942
| Assignee | ||
Comment 1•6 years ago
|
||
This seems to be due to how the triggering principal on the <browser> is based on the top-level frame of the originating video.
I think it's a mistake to declare that the triggering principal is that top-level frame principal. I think we can get away with having it be the null principal (principal of least ability).
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
Comment 2•6 years ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) from comment #1)
This seems to be due to how the triggering principal on the <browser> is based on the top-level frame of the originating video.
I think it's a mistake to declare that the triggering principal is that top-level frame principal. I think we can get away with having it be the null principal (principal of least ability).
I'm not super familiar with the architecture here, but that would potentially change what referrer is sent for the video, or whether same-site cookies get used, or what container it gets opened in, or ... So I'd proceed with caution...
| Assignee | ||
Comment 3•6 years ago
|
||
Cloning the original node was needed when we needed the MediaInfo copied over, but
HTMLVideoElement::CloneElementVisually copies it over for us, so we can create a
fresh <video> element. This should also be a much healthier thing to do
security-wise, since we're not cloning strange nodes from the web.
| Assignee | ||
Comment 4•6 years ago
|
||
I'm upgrading the priority of this, because we now appear to be broken for YouTube embeds on (at least) Reddit.
STR:
- Visit https://old.reddit.com/r/puptheband/comments/dcunuj/pup_sibling_rivalry_live_at_the_verge/ (though I imagine any embedded video on Reddit will work)
- Play the video
- While the video is playing, attempt to open it in Picture-in-Picture via the toggle
ER:
The video should pop out into a PiP player window.
AR:
A blank PiP player window is opened, but the original video continues to play in its starting location.
| Assignee | ||
Comment 5•6 years ago
|
||
Going to write a regression test for this too.
| Assignee | ||
Comment 6•6 years ago
|
||
Depends on D48123
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
Comment 8•6 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 9•6 years ago
|
||
Note that the fix for this has landed, and I'm just waiting on the review for the test patch, then I can close this out.
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Backed out changeset 00b56e289d2e (Bug 1585769) for causing perma bc failures in toolkit/components/pictureinpicture/tests/browser_thirdPartyIframe.js CLOSED TREE
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=271534451&repo=autoland&lineNumber=20281
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
| bugherder | ||
| Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•3 years ago
|
Description
•