Christmas Dinner

First Flight #31
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Severity: medium
Valid

For users signuped with ether, the participant state will not be updated

Summary

For users signuped with ether, the participant state will not be updated.

Vulnerability Details

In the receive function:

receive() external payable beforeDeadline {
etherBalance[msg.sender] += msg.value;
emit NewSignup(msg.sender, msg.value, true);
}

user can send ether and signup, but participant state will not be updated.

Impact

getParticipationStatus function will always return false for users signuped with ether, and can not be set to new host.

Recommendations

Add participant update in receive function:

receive() external payable beforeDeadline {
+ participant[msg.sender] = true;
etherBalance[msg.sender] += msg.value;
emit NewSignup(msg.sender, msg.value, true);
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 8 months ago
Submission Judgement Published
Validated
Assigned finding tags:

receive does not update participation status

Support

FAQs

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