fix: a listed site ending in a dot gets the phishing warning (closes #534)
The blocklist check hashed the hostname as the page gave it, so "myetheywallet.com." and every subdomain written that way hashed differently from the listed "myetheywallet.com" and opened approval prompts with no warning. The browser and DNS treat both spellings as one host. hostnameVariants() now drops one trailing dot before building the hostname and its parent domains, so the check sees the name the list holds. Model: opus-5-5
This commit is contained in:
@@ -2659,7 +2659,8 @@ plaintext list of anyone's domain names.
|
||||
When a dApp on a blocklisted domain requests a wallet connection, transaction
|
||||
approval, or signature, the approval popup displays a prominent red warning
|
||||
banner alerting the user. The domain checker matches exact hostnames and all
|
||||
parent domains (subdomain matching).
|
||||
parent domains (subdomain matching), and checks a hostname written with a
|
||||
trailing dot (`name.`) as `name`.
|
||||
|
||||
#### Transaction Decoding
|
||||
|
||||
|
||||
Reference in New Issue
Block a user