Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Logic Flaw and useless check

Summary

Given how checkTwice is implemented, s_theListCheckedTwice is always equal to s_theListCheckedOnce (if the modifier is corrected).

Vulnerability Details

It's not a vulnerability but raises questions about the goal of checkList and checkTwice and the double check here again. This implementation, possibly desired, excludes people who are Nice on the first check and Very Nice on the second.

Impact

Inaccurate checks by Santa may lead to Nice/Very Nice people not receiving rewards.

Tools Used

Manual review.

Recommendations

Remove

if (s_theListCheckedOnce[person] != status) {
revert SantasList__SecondCheckDoesntMatchFirst();
}

and allow people with hybrid Nice/Very Nice status to mint as Nice people.

Or

Only check s_theListCheckedTwice for readability/simplicity purposes.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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