1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 11:28:51 +01:00
metamask-extension/test
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
..
data EIP-1559 V2: Use default gas preferences of user for all transactions (#13238) 2022-01-10 14:34:54 -05:00
e2e Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
helpers Deprecate extensionizer for webextension-polyfill (#13960) 2022-03-18 14:07:05 -05:00
jest Add a new fiat onboarding option via MoonPay (#13934) 2022-03-21 10:26:52 +01:00
lib Removed metrics event (#14042) 2022-03-29 08:46:24 -05:00
mocks Permission System 2.0 (#12243) 2021-12-06 19:16:49 -08:00
stub Upgrade ganache - continued (#13354) 2022-01-20 16:56:52 +00:00
unit-global Add lockdown e2e test (#12562) 2021-11-02 17:01:01 -07:00
env.js
setup.js
test-unit-combined.sh
test-unit-jest.sh