Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Valid

No Function to Notify Students and Teachers That a Session Has Ended

Summary
Unlike the startSession function, there is no function or event to notify students and teachers that a session has ended.

Vulnerability Details
Root Cause: The contract does not emit an event or provide a function to notify participants when a session ends.

Initial State: A session is active.

Step 1: The session end time (sessionEnd) is reached.

Outcome: Students and teachers are not notified that the session has ended.

Implications: Lack of transparency and communication could lead to confusion among participants.

Impact
Who is affected: Students and teachers.

How they are affected: Participants are unaware of the session's status, leading to potential miscommunication.

Tools Used
manuel review

Recommendations
Emit an event when the session ends:

event SessionEnded(uint256 timestamp);

function endSession() public onlyPrincipal {

require(block.timestamp >= sessionEnd, "Session not ended yet");

inSession = false;

emit SessionEnded(block.timestamp);

}

Updates

Lead Judging Commences

yeahchibyke Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

no event

Event not emitted

Support

FAQs

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