The addTreat
function allows for adding new treats with an existing name, which overwrites the previous treat entry. This causes the original treat data (such as cost and metadataURI) to be overwritten without notice, leading to potential discrepancies in treat tracking and unexpected NFT metadata.
Overwriting treats with the same name results in a loss of the original treat information, which could lead to inaccurate treat listings. This could be especially confusing for users interacting with the contract as they may not expect an updated treat to replace an existing one without any indication.
Manual Reading, Foundry
Add the following check at the beginning of the addTreat
function:
The function `addTreat` is called by the owner. The owner is trusted. There will be no duplicates.
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.