SantaList:buyPresent()
can't buy and send the Present directly to someone else. When a user invokes SantaList::buyPresent()
, the functionality is restricted to acquiring a present exclusively for themselves, not for someone else. The buyPresent()
function necessitates providing the presentReceiver
address as the destination for the Present NFT. While the user incurs a cost of 1 SantaToken for the purchase, it is important to note that the function attempts to burn the SantaToken
from the presentReceiver
address, not the msg.sender
. This reverts because the user may not have the SantaToken
and in case he/she hasn't authorized the SantasList
contract to spend their SantaTokens
. The only way to buy a Present for someone else, is to buy the Present for themself and then transfer to the Present recipient.
Manual review
Evaluate to modify the buyPresent()
function for burning the msg.sender SantaToken
amount and safeTransferFrom()
the Present to the presentReceiver
.
Current implementation allows a malicious actor to burn someone else's tokens as the burn function doesn't actually check for approvals.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.