Where. The typed data screen (formatTypedDataHtml() in src/popup/views/approval.js) shows each message field's value as the site sent it. ethers signs a bool field as !!value (node_modules/ethers/lib.commonjs/hash/typed-data.js, the bool encoder), so any truthy value is signed as true and a missing field as false.
What happens. A site sends a bool field as the string "false": the screen reads false, and the signature says true. A site leaves a declared bool field out: the screen shows nothing for it, and the signature says false. A field such as "approved" or "allowPartialFill" can be signed as the opposite of what the user read.
Should. README SignApproval: the screen shows the typed data's fields so the user can see what is signed. A value on the screen must be the value signed.
Severity: major
Definition of done
Typed data with a declared field missing from the message, or a bool field whose value is not true or false, is refused with a full sentence on the screen's error line, Sign disabled, and the background refuses it too.
Typed data whose fields are all present and whose bool fields are real booleans signs as now.
Tests cover a "false" string, a missing bool field, and a well-formed message.
Model: opus-5-5
Found by the worker on https://git.eeqj.de/sneak/AutistMask/issues/539.
**Where.** The typed data screen (`formatTypedDataHtml()` in `src/popup/views/approval.js`) shows each message field's value as the site sent it. ethers signs a `bool` field as `!!value` (`node_modules/ethers/lib.commonjs/hash/typed-data.js`, the `bool` encoder), so any truthy value is signed as `true` and a missing field as `false`.
**What happens.** A site sends a `bool` field as the string `"false"`: the screen reads `false`, and the signature says `true`. A site leaves a declared `bool` field out: the screen shows nothing for it, and the signature says `false`. A field such as "approved" or "allowPartialFill" can be signed as the opposite of what the user read.
**Should.** README SignApproval: the screen shows the typed data's fields so the user can see what is signed. A value on the screen must be the value signed.
Severity: major
## Definition of done
- [ ] Typed data with a declared field missing from the message, or a `bool` field whose value is not `true` or `false`, is refused with a full sentence on the screen's error line, Sign disabled, and the background refuses it too.
- [ ] Typed data whose fields are all present and whose `bool` fields are real booleans signs as now.
- [ ] Tests cover a `"false"` string, a missing `bool` field, and a well-formed message.
Model: opus-5-5
clawbot
self-assigned this 2026-10-14 12:49:05 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found by the worker on #539.
Where. The typed data screen (
formatTypedDataHtml()insrc/popup/views/approval.js) shows each message field's value as the site sent it. ethers signs aboolfield as!!value(node_modules/ethers/lib.commonjs/hash/typed-data.js, theboolencoder), so any truthy value is signed astrueand a missing field asfalse.What happens. A site sends a
boolfield as the string"false": the screen readsfalse, and the signature saystrue. A site leaves a declaredboolfield out: the screen shows nothing for it, and the signature saysfalse. A field such as "approved" or "allowPartialFill" can be signed as the opposite of what the user read.Should. README SignApproval: the screen shows the typed data's fields so the user can see what is signed. A value on the screen must be the value signed.
Severity: major
Definition of done
boolfield whose value is nottrueorfalse, is refused with a full sentence on the screen's error line, Sign disabled, and the background refuses it too.boolfields are real booleans signs as now."false"string, a missingboolfield, and a well-formed message.Model: opus-5-5