Skip to content

Commit 5934db2

Browse files
committed
[security] Disallow non-HTTP URLs in click2load resource
Related issue: GHSA-fmr5-x4fm-vhgp
1 parent ec0d053 commit 5934db2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎src/js/click2load.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if ( typeof vAPI !== 'object' ) { return; }
3131
const url = new URL(self.location.href);
3232
const actualURL = url.searchParams.get('url');
3333
const frameURL = url.searchParams.get('aliasURL') || actualURL;
34+
if ( /^https?:\/\//.test(frameURL) === false ) { return; }
3435
const frameURLElem = document.getElementById('frameURL');
3536

3637
frameURLElem.children[0].textContent = actualURL;

0 commit comments

Comments
 (0)