Any user can become a participant of an event even without having sent funding to the contract.
Users can only become participants of an event after they have sent funding through the ChristmasDinner::deposit
function.
Existing participants can change to non-participants/generous funders by calling ChristmasDinner::changeParticipationStatus
function.
If function is called by a !participant user, they are automatically added as participant.
Vulnerability exists in the second conditional branh of the if statement:
Non participants without having sent any funding can become a participant, undermining the requirement to send funding to become a participant.
Proof Of Code
Add this test to ChristmasDinnerTest.t.s
cccc
Manual review
Add checks to `ChristmasDinner::changeParticipationStatus
` function to ensure if !participant then they must have sent funding for status to be set to true.
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.