ReceiptRenderer SVG code is incorrect and makes text illegible #127
Labels
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
downgraded by judge
Judge downgraded the risk level of this issue
grade-b
Q-80
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/rabbitholegg/quest-protocol/blob/main/contracts/ReceiptRenderer.sol#L100-L114
Vulnerability details
In
ReceiptRenderer.sol
the generated SVG ingenerateSVG
has both texts (RabbitHole Quest # and RabbitHole Quest Receipt #) rendered on top of each other, making the text completely illegible.Impact
SVG rendering of receipts will be illegible for users.
Proof of Concept
Put the SVG code in a renderer: you will see that both texts are on top of each other.
The SVG looks like this (using
questId_ = 1
, andtokenId_ = 1
):Tools Used
SVG Viewer
Recommended Mitigation Steps
Use the SVG tag
tspan
for each row of text. Correct code:Result:
The text was updated successfully, but these errors were encountered: