Merge pull request #4893 from kelvintyb/develop

Move phishing warning to the extension
feature/default_network_editable
Thomas Huang 6 years ago committed by GitHub
commit 1540b5e256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. BIN
      app/images/ethereum-metamask-chrome.png
  2. 3
      app/manifest.json
  3. 60
      app/phishing.html
  4. 5
      app/scripts/contentscript.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

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

@ -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>

@ -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
}

Loading…
Cancel
Save