Christmas Dinner

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

`ChristmasDinner::deposit` Has a Missing functionality as mentioned in the function natspac

Summary

The ChristmasDinner::deposit function lacks an essential feature outlined in its natspac documentation.

https://github.com/Cyfrin/2024-12-christmas-dinner/blob/9682dcc306db935a2511e1eb8280d17ef01e9004/src/ChristmasDinner.sol#L108

https://github.com/Cyfrin/2024-12-christmas-dinner/blob/9682dcc306db935a2511e1eb8280d17ef01e9004/src/ChristmasDinner.sol#L115

Vulnerability Details

The ChristmasDinner::deposit function lacks an essential feature outlined in its natspac documentation. According to the documentation, the function should enable users to sign up other users. However, the current implementation does not support this behavior since all the logic depends solely on msg.sender, preventing the caller from specifying a different address.

Tools Used

  • IDE

  • Manual Code Review

Recommendations

  • Update the function to accept an address parameter to allow callers to specify the address of the user being signed up.

Updates

Lead Judging Commences

0xtimefliez Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Deposit function lacks functionality

Support

FAQs

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

Give us feedback!