Beatland Festival

First Flight #44
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Impact: low
Likelihood: high
Invalid

`FestivalPass:setOrganizer` doesn't emit an event

FestivalPass:setOrganizer doesn't emit an event

Description

  • The owner can change the organizer using the FestivalPass:setOrganizer function.

  • The issue is no event is emitted. IFestivalPass does not have an event for this critical function

function setOrganizer(address _organizer) public onlyOwner {
@> organizer = _organizer;
}

Risk

Likelihood:

  • This occurs every time FestivalPass:setOrganizer is called.

Impact:

  • External applications relying on the emission to detect suspicious organizer updates would not function correctly

Proof of Concept

Place the following into FestivalPass.t.sol and expect it to fail on the vm.expectEmit

event OrganizerUpdated(address indexed organizer);
...
function test_SetOrganizer_Emit() public {
address newOrganizer = makeAddr("newOrganizer");
vm.expectEmit(true, true, false, true);
emit OrganizerUpdated(address(newOrganizer));
festivalPass.setOrganizer(newOrganizer);
}

Recommended Mitigation

Place the following into IFestivalPass.sol

+ /**
+ * @notice Emitted when the owner updates the organizer
+ * @param organizer Address of the new organizer
+ */
+ event OrganizerUpdated(address indexed organizer);

Place the following into FestivalPass.sol

function setOrganizer(address _organizer) public onlyOwner {
+ emit OrganizerUpdated(_organizer);
organizer = _organizer;
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 27 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Missing events / Events not properly configured

Informational. This protocol doesn't rely on events to function, they are just nice to have, but not mandatory.

Support

FAQs

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