Lack of access control on checkList
function will cause unfair advantage to get any status.
checkList
function is first step to get nft / token reward. As per Natspec documentation of said function, it should be called by i_santa
only. but current version lacks of access control for it. so anybody can call it and get desired status. If same list is used by santa for checkTwice
then attacker will get rewards that he doesn't supposed to be.
in the existing test suit, we can verify it by adding following function
Then run following command in your vscode forge test --match-test testCheckListPublic -vv
it will print following, showing that it's passed
Unfair advantage over rewards
Manual Review, Foundry
User onlySanta modifier for the function, which is already declared in the contract.
Correct version should look like this.
Anyone is able to call checkList() changing the status of a provided address. This is not intended functionality and is meant to be callable by only Santa.
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.