[Webkit-unassigned] [Bug 165412] New: top.location.assign is undefined inside non-sandboxed iframe on different origin
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 5 13:57:15 PST 2016
https://bugs.webkit.org/show_bug.cgi?id=165412
Bug ID: 165412
Summary: top.location.assign is undefined inside non-sandboxed
iframe on different origin
Classification: Unclassified
Product: WebKit
Version: Safari 10
Hardware: iPhone / iPad
OS: iOS 10
Status: NEW
Severity: Normal
Priority: P2
Component: Frames
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mkhatib727 at gmail.com
top.location.assign is undefined inside an iframe. For example,
top: https://hello.com
iframe: https://whatsapp.com
script loaded from: https://whatsapp.com
executes -> window.top.location.assign('https://whatever.com') // <- .assign is undefined and throws a security error
executes -> window.top.location.replace('https://whatever.com') // <- .replace is NOT undefined and works as expected
executes -> window.top.location.href = 'https://whatever.com' // <- works as expected
Errors thrown by .assign:
window.top.location.assign is not a function. (In 'window.top.location.assign(url)', 'window.top.location.assign' is undefined)
Blocked a frame with origin 'https://whatsapp' from accessing a frame with origin 'https://hello.com'. Protocols, domains, and ports must match.
The expected behavior is that .assign would still work in non-sandboxed iframes - similar to replace.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161205/ba5450e0/attachment-0001.html>
More information about the webkit-unassigned
mailing list