harden: one connection and one signature prompt per site at a time (closes #405)
Each eth_requestAccounts or personal_sign call opened another approval window, so a page calling in a loop could cover the screen with identical prompts. While a site's connection or signature prompt is unanswered, a further request of that kind from the same site is now refused with EIP-1193 -32002, the code a second transaction already gets, and opens no window. The pending approval itself is the record: the check and the approval's creation have nothing awaited between them. Other sites are unaffected, and the site may ask again once the user answers. Model: opus-5-5
This commit is contained in:
@@ -1840,7 +1840,9 @@ view would leave a wallet one click from deletion.
|
||||
`wallet_requestPermissions` and is on neither the allowed nor the denied list.
|
||||
The background script prefers the toolbar popup (`action.openPopup()`) and
|
||||
falls back to a separate popup window (`src/background/index.js`,
|
||||
`requestApproval()`).
|
||||
`requestApproval()`). Only one exists per site at a time: a further connection
|
||||
request from a site whose prompt is still unanswered is refused with EIP-1193
|
||||
code `-32002` and opens nothing.
|
||||
- **Elements**:
|
||||
- "Connection Request" heading
|
||||
- Phishing warning banner (shown when the hostname is on the phishing
|
||||
@@ -1901,7 +1903,10 @@ view would leave a wallet one click from deletion.
|
||||
|
||||
- **When**: A connected website requests a message signature via
|
||||
`personal_sign`, `eth_sign`, or `eth_signTypedData_v4`. Opened the same way as
|
||||
TxApproval, in a separate popup window.
|
||||
TxApproval, in a separate popup window. Only one exists per site at a time: a
|
||||
further signature request, by any of these methods, from a site whose
|
||||
signature request is still unanswered is refused with EIP-1193 code `-32002`
|
||||
and opens no window.
|
||||
- **Elements**:
|
||||
- "Signature Request" heading
|
||||
- Phishing warning banner (shown when the hostname is on the phishing
|
||||
|
||||
Reference in New Issue
Block a user