If the owner adds a treat in which the name already exists, the existing data will be overwritten.
Function addTreat()
allows the owner to add a new treat. Since the treat's name
is the key to the mapping treatList
, if the owner adds a new treat with an identical name with an existing treat, then the existing treat will be overwritten with the new one. This is because there is no check to prevent this case to occur.
Overwritten existing data.
Manual review.
Consider adding a check to prevent duplicated treat names.
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.