Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

Default user status is NICE

Summary

If not set, user status is NICE

Vulnerability Details

Status is a struct

enum Status {
NICE,
EXTRA_NICE,
NAUGHTY,
NOT_CHECKED_TWICE
}

That has first or default value as NICE
In mappings

mapping(address person => Status naughtyOrNice) private s_theListCheckedOnce;
mapping(address person => Status naughtyOrNice) private s_theListCheckedTwice;

Status for persons if NICE if not set. So persons for whom status is not set can just call checkList and status checks will pass

Impact

Any person with unset status can mint NFT gift

Tools Used

Recommendations

Use NOT_CHECKED_TWICE as first enum element

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

default status is nice

In Solidity the first element of an enum is the default value. In Santa's List, the means each person is mapped by default to 'NICE'.

Support

FAQs

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