HomePhabricator

[explorer] Add replace rule for token data

Description

[explorer] Add replace rule for token data

Summary:
If you check out https://explorer.e.cash/address/ecash:qz2708636snqhsxu8wnlka78h6fdp77ar59jrf5035
you can see the coins dropdowns for the tokens dont work and there is some data printed to the screen at the bottom

With Tobias's help we figured out this was due to a token name with a <script> tag in it. or an improper closing </script>
tag causing the display issue probably. But also could be possible avenue for a script injection

Adding a replace for '<' and '>' to their hexadecimal forms to prevent any unwanted html interpretation

Test Plan: preview the site and check /address/ecash:qz2708636snqhsxu8wnlka78h6fdp77ar59jrf5035 works without issue

Reviewers: #bitcoin_abc, tobias_ruck

Reviewed By: #bitcoin_abc, tobias_ruck

Differential Revision: https://reviews.bitcoinabc.org/D16671

Details

Provenance
johnkuneyAuthored on Aug 21 2024, 18:17
johnkuneyPushed on Aug 21 2024, 19:20
Reviewer
Restricted Project
Differential Revision
D16671: [explorer] Add replace rule for token data
Parents
rABC3dfcb1da12d6: [explorer] Support multi-token transactions
Branches
Unknown
Tags
Unknown