-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable eth_sign by default, allow users to toggle it back on #17308
Conversation
…n advanced settings to renable support for eth_sign
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
The content of the toggle should be:
@coreyjanssen could we have your review here? |
revised content here (made it a bit more user-friendly):
|
@holantonela @coreyjanssen thank you, i have pushed the copy change in 37d0ba3 |
I think if an |
Good point. But, if we ask users to enable it the right away, we are missing the point of making it optional. After we release, we can learn more things about how users use or not In the case we want to prompt users to change defaults, we can offer users the option to save the origin domain in a safe list so if they trust the origin, they allow them to trigger |
…sign * origin/develop: (142 commits) Use network provider state, instead of CurrencyRateController state, to select 'nativeCurrency' (MetaMask#17450) [e2e]Add e2e test for deleting custom network (MetaMask#17254) Fix MetaMask#17362 - Ensure NFT icons are correct (MetaMask#17440) Fix MetaMask#17385 - Provide autohide callback for ActionMessage (MetaMask#17392) button link housekeeping (MetaMask#16885) Bump lavapack version to 5 (MetaMask#17431) feature: convert shared/modules/contract-utils.test.js to typescript (MetaMask#17435) Refactor confirm page container component from class to functional component (MetaMask#16907) Test parameter change cache miss (MetaMask#17346) Document callback-style background calls as deprecated (MetaMask#17376) Improving getMemoizedMetadataContractName selector (MetaMask#17432) [GridPlus] Bumps `gridplus-sdk` to v2.4.1 (MetaMask#16847) Put hardware wallets behind an HARDWARE_WALLETS_MV3 flag (MetaMask#17354) Consolidated all component import paths (MetaMask#17368) updated new links for the stories (MetaMask#17369) Fix MetaMask#17388 - Remove dismiss button from NFT notification (MetaMask#17389) Remove a notification for falling back from STX to regular swaps (MetaMask#17374) Feat/15086/add banner severities component (MetaMask#17307) fix icon names (MetaMask#17391) Fix Playwright install step (MetaMask#17415) ...
This PR closes #17491 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
test/e2e/tests/eth-sign.spec.js
Outdated
@@ -31,10 +59,18 @@ describe('Eth sign', function () { | |||
await driver.fill('#password', 'correct horse battery staple'); | |||
await driver.press('#password', driver.Key.ENTER); | |||
|
|||
// Enable eth_sign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of enabling eth_sign
with Settings, we could skip all the steps below by enabling it from the state. This will make the test faster and complies with the standards followed on e2e.
Detailed explanation: on fixture-builder
file, we could add the state for eth_sign
and set it to true
on a function below, in the same way it's done with other preferences.
Then on this test, we can just enable that fixture like this example:
.withPreferencesController({
preferences: {
showFiatInTestnets: true,
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait for the notification popup to close, leaving 2 window handles the extension and the test dapp
Explanation
After looking at various phishing kits (and de-obfuscating), there are enormous trends between different kits that they all abuse
eth_sign
to ask users to inadvertently sign a transaction (as MetaMask UI is opaque to an on-chain transaction being signed). You can read more about the attack here.I'd estimate that the abuse of
eth_sign
is near equal to the abuse of Wyvern and Seaport contracts in a manner to steal NFTs through creating orders for 0 eth to a specific beneficiary.In short:
eth_sign
has been consistently abused by phishers/scammers to steal funds and the case may be that only power-users who use very legacy dapps may need to still useeth_sign
.eth_sign
by default - throw anethErrors.rpc.methodNotFound
exceptioneth_sign
through "Advanced Settings"RPC Method preferences are stored within
rpcMethodPreferences
in the store state, allow for us to develop this further if someone wants to lock down rpc calls into MetaMaskScreenshots/Screencaps
Manual Testing Steps
goto: 1
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.