Christmas Dinner

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

depositing Ether doesn't change participation status

Summary

depositing Ether doesn't change participation status

Vulnerability Details

The issues is located on line 255 in ChristmasDinner.sol.

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

When someone wants to participate in the dinner, but only through depositing Ether, his participation status won't be changed.

Impact

Could lead to not including actual participants in the list, if they don't check and use changeParticipationStatus() themselves.

Tools Used

Manual analysis.

Recommendations

Update the mapping

participant[msg.sender] = true;

when the Ether deposit happens, as with the function deposit(address _token, uint256 _amount).

Updates

Lead Judging Commences

0xtimefliez Lead Judge 7 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.