Skip to content

fix: escape wallet table values#5

Open
1507819106zxzx-crypto wants to merge 1 commit into
BitgesellOfficial:masterfrom
1507819106zxzx-crypto:harden-table-rendering
Open

fix: escape wallet table values#5
1507819106zxzx-crypto wants to merge 1 commit into
BitgesellOfficial:masterfrom
1507819106zxzx-crypto:harden-table-rendering

Conversation

@1507819106zxzx-crypto
Copy link
Copy Markdown

Summary:

  • Escape transaction IDs and wallet addresses before rendering them into table HTML attributes/text.
  • URL-encode explorer and hash-route path segments generated from table values.
  • Adds a small shared escapeHtml helper for wallet table renderers.

Why:
The normal data shape should be Bitgesell addresses and transaction hashes, but these values are still sourced from local wallet storage and remote API responses before being interpolated into HTML strings. Encoding them keeps abnormal or compromised data from breaking attributes or injecting markup in the wallet UI.

Verification:

  • node --check src/utils.js
  • node --check src/transactions/transactions.js
  • node --check src/my-addresses/my-addresses.js
  • npx eslint --rule "linebreak-style: 0" src/utils.js src/transactions/transactions.js src/my-addresses/my-addresses.js
  • git diff --check

Related bounty: BitgesellOfficial/bitgesell#39 / BitgesellOfficial/bitgesell#81
Payout address if accepted: 0x4451dF3D21925eF7a62D20eEdc80B99f7140C5D2

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.

2 participants