Repository navigation
Refuse a wallet answer that is not a transaction hash before the app page logs it - #333
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
/apppage logged the wallet's answer toeth_sendTransactionthroughtxLink, which put it into anhrefand into the link text withinsertAdjacentHTML. 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'sscript-src 'self'keeps inline handlers from running, so the exposure was markup and a misleading link, not script.sendTxnow refuses anything but a 32-byte hex hash before it logs it or polls for its receipt, as the explorer pages already do withisHash. 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.jsanswerseth_sendTransactionwith markup. It fails on the oldapp.jsand passes now. Locally withCI=1: 1549 of 1550 oracle tests pass, andscripts/check-docs.mjsis ok. The one failure, "the ledger status counts outcomes once a list", is the timing bound instore.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.htmlnow loadsapp.jsat?v=txhash1, so returning visitors get the new file. After the merge, uploadsite/assets/app.js, thensite/app.html, clear the cache and runcheck-live site. No oracle or contract change.🤖 Generated with Claude Code