Closed raszpl closed 4 years ago
Also valid for the rewrite branch.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#sandbox#attr-sandbox: allow-same-origin: If this token is not used, the resource is treated as being from a special origin that always fails the same-origin policy.
Thanks for the link.
POC page https://www.fit.vutbr.cz/~ipolcak/jsr/iframe/iframe.php shows that the problem concerns all iframes.
Also the problem should affect all HTML elements. Currently, we wrap canvas element only.
Fixed in ea02f05 (except #25). @raszpl Thank you for reporting and providing the code.
https://browserleaks.com/canvas
will bypass toDataURL stub and return [native code]
you need something like this:
to wrap canvases inside same origin iframes. Not my code. Found it some time ago but didnt understand the purpose at first, finally https://browserleaks.com/canvas iframe trick made everything clear. Patches contentDocument contentWindow accesses to hotpatch HTMLCanvasElement/CanvasRenderingContext2D inside of accessed iframes.