addTreat
function updates treatList
mapping if treat already exists but still appends it to treatNames
array leading to inconsistent treat data.Description:
As treat name is used to get its data, addTreat
function should check that only unique names are added. This missing check can lead to treatList
mapping getting updated but still new treatName
item is pushed if same treat name is added by owner.
Recommended Mitigation:
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.