In the s_theListCheckedOnce
and s_theListCheckedTwice
mappings the naughtyOrNice
property defaults to 0 which means everyone is NICE by default.
When the list is not checked by Santa yet, any address could call the collectPresent
function and mint an ERC721 because the Status has been set to NICE
by default
Exploiting this vulnerability any address could mint a token without being checked, an attacker could create an unlimited amount of addresses and send them to another address and sell them on secondary markets and dump the price while the nice children would only get 1 token.
vscode
Change the first item of the enum to UNDEFINED
, NAUGHTY
, NOT_CHECKED_TWICE
or anything other than NICE
or VERY_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'.
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.