sessionStorage does not work in opaque origins
Reported by
krass...@gmail.com,
Jan 1 2017
|
|||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0 Steps to reproduce the problem: 1. Create a site with an iframe with sandbox-attribute that has no allow-same-origin value that 2. The content of the sandboxed iframe calls window.sessionStorage What is the expected behavior? Since the W3C-spec ( https://www.w3.org/TR/html5/embedded-content-0.html#the-iframe-element ) disallows access to localStorage but still allows accessing the sessionStorage, I would expect the gain access to some kind of sessionStorage. Since the content of the iframe has a unique origin, I would expect that sessionStorage to be unique as well, so it exists only within that iframe. What went wrong? The JS throws a security exception. This is due to the discussion here: https://bugs.webkit.org/show_bug.cgi?id=38151 But I really think that this behavious is wrong. Maybe it was just a workaround, because back then the sessionStorage was not unique. But it causes other problems. Using the JS-API in a correct way should not cause exceptions that destroy the whole page. Did this work before? No Chrome version: 55 Channel: stable OS Version: OS X 10.12 Flash Version: Shockwave Flash 24.0 r0
,
Jan 3 2017
@krassmus-- Could you please provide us the sample test case to reproduce the issue , that would help us in triaging the issue better. Thanks!
,
Jan 3 2017
Sure, here it comes: http://krassmus.virgo.uberspace.de/bug677733-test/ And code is here: https://github.com/Krassmus/bug677733-test
,
Jan 10 2017
Thank you for providing more feedback. Adding requester "hdodda@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 13 2017
,
Jan 17 2017
I thought there was a bug for this already, but yeah, the current session storage implementation incorrectly does not work in unique/opaque origins (such as sandboxed iframes).
,
Oct 11 2017
,
Nov 10 2017
,
Feb 18 2018
,
Aug 1
,
Jan 2
,
Jan 2
+pwnall for your radar |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by junov@chromium.org
, Jan 2 2017