Trick or Treat

First Flight #27
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Cannot set the cost if cost is 0

Summary:

Owner cannot call the setTreatCost function, if the cost is 0. But he can add a treat with cost 0.

Vulnerability details:

When the owner wants to call the setTreatCost function and set the cost, he needs to pass the check, but if the price was set to 0 he cannot.

Impact:

cannot set the treat cost.

Tools Used:

Manual review

Recommendations:

The vulnerability occurs, because the owner can add a treat with price of 0. Remove the check in setTreatCost function completely, or add a check to addTreat function, that says the price must be more than 0.

Updates

Appeal created

bube Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

[invalid] Zero treat cost

The cost of the treat is set only by the owner (in the constructor, in addTreat and in setTreatCost). That means the cost of the treat will always be greater than zero.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.