From c249cf0190ff140ff559049ca764fc1324e23171 Mon Sep 17 00:00:00 2001 From: weizman Date: Mon, 17 Jul 2023 12:55:16 +0300 Subject: [PATCH] fix issue 91 --- test/edge.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/test/edge.js b/test/edge.js index 3cf2c0c..4ca58e6 100644 --- a/test/edge.js +++ b/test/edge.js @@ -310,4 +310,35 @@ describe('special cases', () => { }); expect(['V,V,V']).toContain(result); }); + + it('should fail to use atob of an iframe born out of mXSS (srcdoc)', async function () { + // reference: https://github.com/LavaMoat/snow/issues/91 + if (global.BROWSER !== 'CHROME') { + this.skip(); + } + const result = await browser.executeAsync(function(done) { + top.bypass = (wins) => top.TEST_UTILS.bypass(wins, done); + (function(){ + testdiv.innerHTML = ``; + testdiv.innerHTML = testdiv.innerHTML; + }()); + }); + expect(['CSP-script-src-elem']).toContain(result); + }); }); \ No newline at end of file