Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SES lockdown on older browsers #10014

Merged
merged 1 commit into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<body>
<div id="app-content"></div>
<div id="popover-content"></div>
<script src="./globalthis.js" type="text/javascript" charset="utf-8"></script>
<script src="./initSentry.js" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.cjs" type="text/javascript" charset="utf-8"></script>
<script src="./runLockdown.js" type="text/javascript" charset="utf-8"></script>
Expand Down
8 changes: 7 additions & 1 deletion app/manifest/_base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"author": "https://metamask.io",
"background": {
"scripts": [
"globalthis.js",
"initSentry.js",
"lockdown.cjs",
"runLockdown.js",
Expand Down Expand Up @@ -36,7 +37,12 @@
"content_scripts": [
{
"matches": ["file://*/*", "http://*/*", "https://*/*"],
"js": ["lockdown.cjs", "runLockdown.js", "contentscript.js"],
"js": [
"globalthis.js",
"lockdown.cjs",
"runLockdown.js",
"contentscript.js"
],
"run_at": "document_start",
"all_frames": true
},
Expand Down
1 change: 1 addition & 0 deletions app/notification.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<img id="loading__spinner" src="./images/spinner.gif" alt="" />
</div>
<div id="popover-content"></div>
<script src="./globalthis.js" type="text/javascript" charset="utf-8"></script>
<script src="./initSentry.js" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.cjs" type="text/javascript" charset="utf-8"></script>
<script src="./runLockdown.js" type="text/javascript" charset="utf-8"></script>
Expand Down
1 change: 1 addition & 0 deletions app/phishing.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html lang="en">
<head>
<title>Ethereum Phishing Detection - MetaMask</title>
<script src="./globalthis.js" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.cjs" type="text/javascript" charset="utf-8"></script>
<script src="./runLockdown.js" type="text/javascript" charset="utf-8"></script>
<script src="./phishing-detect.js"></script>
Expand Down
1 change: 1 addition & 0 deletions app/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<body style="width:357px; height:600px;">
<div id="app-content"></div>
<div id="popover-content"></div>
<script src="./globalthis.js" type="text/javascript" charset="utf-8"></script>
<script src="./initSentry.js" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown.cjs" type="text/javascript" charset="utf-8"></script>
<script src="./runLockdown.js" type="text/javascript" charset="utf-8"></script>
Expand Down
4 changes: 4 additions & 0 deletions development/build/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ const copyTargets = [
pattern: `*.html`,
dest: ``,
},
{
src: `./node_modules/globalthis/dist/browser.js`,
dest: `globalthis.js`,
},
{
src: `./node_modules/ses/dist/`,
pattern: `lockdown.cjs`,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
"extensionizer": "^1.0.1",
"fast-json-patch": "^2.0.4",
"fuse.js": "^3.2.0",
"globalthis": "^1.0.1",
"human-standard-token-abi": "^2.0.0",
"json-rpc-engine": "^6.1.0",
"json-rpc-middleware-stream": "^2.1.1",
Expand Down