1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts/lib
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
..
ens-ipfs Deprecate extensionizer for webextension-polyfill (#13960) 2022-03-18 14:07:05 -05:00
migrator Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
rpc-method-middleware snaps-skunkworks@0.10.2 (#13901) 2022-03-22 19:55:51 -07:00
account-tracker.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
buy-url.js Add a new fiat onboarding option via MoonPay (#13934) 2022-03-21 10:26:52 +01:00
buy-url.test.js Add a new fiat onboarding option via MoonPay (#13934) 2022-03-21 10:26:52 +01:00
cleanErrorStack.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
cleanErrorStack.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
ComposableObservableStore.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
ComposableObservableStore.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
createLoggerMiddleware.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
createMetaRPCHandler.js Remove nodeify (#13003) 2021-12-08 18:06:53 -03:30
createMetaRPCHandler.test.js Remove nodeify (#13003) 2021-12-08 18:06:53 -03:30
createOnboardingMiddleware.js Deprecate extensionizer for webextension-polyfill (#13960) 2022-03-18 14:07:05 -05:00
createOriginMiddleware.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
createStreamSink.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
createTabIdMiddleware.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
decrypt-message-manager.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
encryption-public-key-manager.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
extractEthjsErrorMessage.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
get-first-preferred-lang-code.js Deprecate extensionizer for webextension-polyfill (#13960) 2022-03-18 14:07:05 -05:00
getObjStructure.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
local-store.js Deprecate extensionizer for webextension-polyfill (#13960) 2022-03-18 14:07:05 -05:00
message-manager.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
message-manager.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
metaRPCClientFactory.js fix metaRPCClientFactory id handling (#11116) 2021-05-17 14:46:00 -07:00
metaRPCClientFactory.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
network-store.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
notification-manager.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
personal-message-manager.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
personal-message-manager.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
seed-phrase-verifier.js Update SRP representation 2022-03-30 21:01:26 -02:30
seed-phrase-verifier.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
segment.js E2e metrics (#13904) 2022-03-29 07:35:06 -02:30
setupSentry.js Restore version missing from certain build steps (#14344) 2022-04-04 21:06:12 -02:30
stream-utils.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
typed-message-manager.js Fixed error thrown for 712 errors (#14008) 2022-03-16 16:42:55 -07:00
typed-message-manager.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
util.js Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
util.test.js Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30