-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use correct build command * added sandbox frame to load WASM * ignoring tests as hard to test * changelog * fixed csp typo * style fixes * Update src/manifest.json * Update src/popup/popup.html Co-authored-by: Jordan Bibla <[email protected]> Co-authored-by: Jordan Bibla <[email protected]>
- Loading branch information
Showing
10 changed files
with
102 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[Security] Move WASM execution into sandboxed script @faboweb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Title</title> | ||
<link rel="stylesheet" href="popup.css" /> | ||
<% if (NODE_ENV === 'development') { %> | ||
<!-- Load some resources only in development environment --> | ||
<% } %> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="popup.js"></script> | ||
</body> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="Content-Security-Policy" | ||
content="script-src 'self' https://www.google-analytics.com/analytics.js; object-src 'self'; connect-src 'self' wss://production-api.lunie.io/graphql https://production-api.lunie.io wss://staging-api.lunie.io/graphql https://staging-api.lunie.io https://monitoring.lunie.io:9000"> | ||
<title>Lunie Browser Extension</title> | ||
<link rel="stylesheet" href="popup.css" /> | ||
<style> | ||
#sandboxFrame { | ||
height: 0 | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<script src="popup.js"></script> | ||
<iframe id="sandboxFrame" src="sandbox.html"></iframe> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="Content-Security-Policy" content="connect-src 'self'"> | ||
</head> | ||
|
||
<body> | ||
<script src="sandbox.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// actions that need a looser CSP like WASM operations | ||
|
||
import { getWallet } from '../../lunie/src/vuex/modules/wallet' | ||
|
||
window.addEventListener('message', async function(event) { | ||
var type = event.data.type | ||
var seedPhrase = event.data.seedPhrase | ||
var networkObject = event.data.networkObject | ||
|
||
if (type === 'getWallet') { | ||
const result = await getWallet(seedPhrase, networkObject) | ||
event.source.postMessage( | ||
{ | ||
result | ||
}, | ||
event.origin | ||
) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters