Merge pull request #4893 from kelvintyb/develop

Move phishing warning to the extension
This commit is contained in:
Thomas Huang 2018-07-27 12:23:31 -07:00 committed by GitHub
commit 1540b5e256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 65 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -67,7 +67,8 @@
"notifications"
],
"web_accessible_resources": [
"inpage.js"
"inpage.js",
"phishing.html"
],
"externally_connectable": {
"matches": [

60
app/phishing.html Normal file
View File

@ -0,0 +1,60 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Phishing Warning</title>
<style>
body {
background: #c50000;
padding: 50px;
display: flex;
justify-content: center;
font-family: sans-serif;
}
.centered {
display: flex;
flex-direction: column;
justify-content: center;
color: white;
max-width: 600px;
}
a {
color: white;
}
</style>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-37075177-6', 'auto');
ga('send', 'pageview');
//Send referral data to EAL
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-68598031-1', 'auto' {'allowLinker':true});
ga('send', 'pageview');
ga('require', 'linker');
ga('linker:autoLink', ['harrydenley.com', 'metamask.io'], false, true);
</script>
</head>
<body>
<div class="centered">
<img src="/images/ethereum-metamask-chrome.png" style="width:100%">
<h3>ATTENTION</h3>
<p>MetaMask believes this domain to have malicious intent and has prevented you from interacting with it.</p>
<p>This is because the site tested positive on the <a href="https://github.com/metamask/eth-phishing-detect">Ethereum Phishing Detector</a>.</p>
<p>You can turn MetaMask off to interact with this site, but it's advised not to.</p>
<p>If you think this domain is incorrectly flagged, <a href="https://github.com/metamask/eth-phishing-detect/issues/new">please file an issue</a>.</p>
</div>
</body>
</html>

View File

@ -197,6 +197,7 @@ function blacklistedDomainCheck () {
* Redirects the current page to a phishing information page
*/
function redirectToPhishingWarning () {
console.log('MetaMask - redirecting to phishing warning')
window.location.href = 'https://metamask.io/phishing.html'
console.log('MetaMask - routing to Phishing Warning component')
let extensionURL = extension.runtime.getURL('phishing.html')
window.location.href = extensionURL
}