You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[demo][acl] Full ACLs are not applied to iframe.contentWindow
Root Cause
iframe.contentWindow has a different set of object chains and thus full ACLs are not applied for the global objects in the "different world".
For example, v instanceof Object does not work for the value v from the iframe.contentWindow even in hook-callback.js
Fix
Introduce global var otherWindowObjects = new Map() object, which is shared among frames and contains mapping of each window.Object to its corresponding window global object
Call otherWindowObjects.get(Object).__hook__() for objects from other iframes
console.error() if __hook__ is missing (TODO: Should throw an exception?)
If iframe.src is empty on attaching a load event handler, empty-document.html is loaded to the iframe so that hooking is available in the iframe.
iframe.contentDocument is blocked for now. (TODO item)
Workarounds (deprecated by the above fix)
No access to iframe.contentWindow and iframe.contentDocument
[demo][acl] Full ACLs are not applied to iframe.contentWindow
Root Cause
iframe.contentWindow
has a different set of object chains and thus full ACLs are not applied for the global objects in the "different world".v instanceof Object
does not work for the valuev
from theiframe.contentWindow
even in hook-callback.jsFix
var otherWindowObjects = new Map()
object, which is shared among frames and contains mapping of eachwindow.Object
to its correspondingwindow
global objectotherWindowObjects.get(Object).__hook__()
for objects from other iframesconsole.error()
if__hook__
is missing (TODO: Should throw an exception?)iframe.src
is empty on attaching aload
event handler,empty-document.html
is loaded to the iframe so that hooking is available in the iframe.iframe.contentDocument
is blocked for now. (TODO item)Workarounds (deprecated by the above fix)
iframe.contentWindow
andiframe.contentDocument
iframe.contentWindow
References
The text was updated successfully, but these errors were encountered: