Skip to content

Refuse a wallet answer that is not a transaction hash before the app page logs it - #333

Merged
RunTimeAdmin merged 1 commit into
mainfrom
fix/site-tx-hash
Nov 16, 2026
Merged

RunTimeAdmin merged 1 commit into
mainfrom
fix/site-tx-hash

Conversation

@RunTimeAdmin

@RunTimeAdmin RunTimeAdmin commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

The /app page logged the wallet's answer to eth_sendTransaction through txLink, which put it into an href and into the link text with insertAdjacentHTML. A malicious or broken wallet could answer with markup and get it into the page's log (finding F-03 of the 16 November security review). The CSP's script-src 'self' keeps inline handlers from running, so the exposure was markup and a misleading link, not script.

sendTx now refuses anything but a 32-byte hex hash before it logs it or polls for its receipt, as the explorer pages already do with isHash. The error tells the user to check the wallet, because the wallet may have sent the transaction anyway.

Tests. A new case in oracle/site-app.test.js answers eth_sendTransaction with markup. It fails on the old app.js and passes now. Locally with CI=1: 1549 of 1550 oracle tests pass, and scripts/check-docs.mjs is ok. The one failure, "the ledger status counts outcomes once a list", is the timing bound in store.test.js (200 status reads in under 50 ms), which the full suite's load pushed over on this machine; it passes alone, twice, and this change does not touch the store.

Rollout. app.html now loads app.js at ?v=txhash1, so returning visitors get the new file. After the merge, upload site/assets/app.js, then site/app.html, clear the cache and run check-live site. No oracle or contract change.

🤖 Generated with Claude Code

…page logs it

The /app page put the wallet's answer to eth_sendTransaction into the log's
HTML through txLink. sendTx now holds it to a 32-byte hash first, as the
explorer pages do (F-03 of the 16 November security review). app.html loads
app.js at ?v=txhash1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RunTimeAdmin
RunTimeAdmin merged commit 9be7aa7 into main Nov 16, 2026
7 checks passed
@RunTimeAdmin
RunTimeAdmin deleted the fix/site-tx-hash branch November 16, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant