diff options
Diffstat (limited to 'src/webex/pages')
-rw-r--r-- | src/webex/pages/redirect.html | 14 | ||||
-rw-r--r-- | src/webex/pages/redirect.js | 12 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/webex/pages/redirect.html b/src/webex/pages/redirect.html new file mode 100644 index 000000000..9d07d3d2b --- /dev/null +++ b/src/webex/pages/redirect.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + + <script src="/src/webex/pages/redirect.js"></script> +</head> + +<body> + Redirecting to extension page ... +</body> + +</html> diff --git a/src/webex/pages/redirect.js b/src/webex/pages/redirect.js new file mode 100644 index 000000000..5a758cce4 --- /dev/null +++ b/src/webex/pages/redirect.js @@ -0,0 +1,12 @@ +/** + * This is the entry point for redirects, and should be the only + * web-accessible resource declared in the manifest. This prevents + * malicious websites from embedding wallet pages in them. + * + * We still need this redirect page since a webRequest can only directly + * redirect to pages inside the extension that are a web-accessible resource. + */ + + +const myUrl = new URL(window.location.href); +window.location.replace(myUrl.searchParams.get("url")); |