President Elector

First Flight #24
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Wrong Error Message in selectPresident()

Summary

The selectPresident() function is responsible for selecting a new president after the current president's term has ended. If the function encounters an issue during execution, it may revert with an incorrect or misleading error message, making it difficult for users or developers to understand the cause of failure. This could hinder effective debugging and troubleshooting.

Vulnerability Details

When conditions are not met for selecting a president (such as the time for voting not yet ending), the current implementation may provide a generic or inappropriate error message. This misleads users into thinking the error is related to a different issue or may not provide enough information to diagnose the root cause of the problem.

Impact

When conditions are not met for selecting a president (such as no votes cast or the term not yet ending), the current implementation may provide a generic or inappropriate error message. This misleads users into thinking the error is related to a different issue or may not provide enough information to diagnose the root cause of the problem.

Tools Used

Manual Review

Recommendations

Change error message

Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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