1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
metamask-extension/app/scripts
Mark Stacey 7199d9c567 Use externally hosted phishing warning page
An externally hosted phishing warning page is now used rather than the
built-in phishing warning page.The phishing page warning URL is set via
configuration file or environment variable. The default URL is either
the expected production URL or `http://localhost:9999/` for e2e testing
environments.

The new external phishing page includes a design change when it is
loaded within an iframe. In that case it now shows a condensed message,
and prompts the user to open the full warning page in a new tab to see
more details or bypass the warning. This is to prevent a clickjacking
attack from safelisting a site without user consent.

The new external phishing page also includes a simple caching service
worker to ensure it continues to work offline (or if our hosting goes
offline), as long as the user has successfully loaded the page at least
once. We also load the page temporarily during the extension startup
process to trigger the service worker installation.

The old phishing page and all related lines have been removed. The
property `web_accessible_resources` has also been removed from the
manifest. The only entry apart from the phishing page was `inpage.js`,
and we don't need that to be web accessible anymore because we inject
the script inline into each page rather than loading the file directly.

New e2e tests have been added to cover more phishing warning page
functionality, including the "safelist" action and the "iframe" case.
2022-05-16 14:40:50 -02:30
..
account-import-strategies Use strict assertion mode everywhere (#11012) 2021-05-07 17:08:24 -02:30
constants Add a new fiat onboarding option via MoonPay (#13934) 2022-03-21 10:26:52 +01:00
controllers Dark Mode: Implement Metrics (#14455) 2022-04-19 13:38:44 -02:30
lib Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
migrations Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
platforms fix instance of browser.extension.getURL() (#14168) 2022-03-24 09:57:24 -05:00
background.js Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
contentscript.js Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
disable-console.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
first-time-state.js Ensure one and only one localhost option appears in network list (#12786) 2021-11-22 12:54:42 -03:30
inpage.js @metamask/providers@8.1.1 (#11078) 2021-05-12 19:51:14 -07:00
lockdown-more.js Update build system lockdown parameter (#12556) 2021-11-01 22:13:22 -10:00
lockdown-run.js lockdown - breakout making globalThis properties non-writable (#12258) 2021-10-01 08:53:12 -10:00
metamask-controller.js Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
metamask-controller.test.js Deprecate extensionizer for webextension-polyfill (#13960) 2022-03-18 14:07:05 -05:00
sentry-install.js Build - refactor for bundle factoring and swappable runtime (#11080) 2021-07-15 10:59:34 -07:00
ui.js Deprecate extensionizer for webextension-polyfill (#13960) 2022-03-18 14:07:05 -05:00