Description
The function ChoosingRam::increaseValuesOfParticipants
does not set isRamSelected
when the variable selectedRam
is set, resulting in no possible way players can use this function to become Ram for the event, which contradicts the documentation.
The documentation states (emphasis mine):
increaseValuesOfParticipants
allows users to increase their values(or characteristics) and become Ram for the event. The values will never be updated again after 12 October 2024.
selectRamIfNotSelected
- Allows the organizer to select Ram if not selected by the user.
Impact
The function increaseValuesOfParticipants
is supposed to give players a chance to increase their values and potentially become Ram, but this function can only be called successfully if the modifier RamIsNotSelected
returns true. The problem is that the modifier checks the boolean value of isRamSelected
, but the function increaseValuesOfParticipants
does not set the isRamSelected
boolean value, so the players can never "become Ram" using this function.
Evidence
The modifier used on increaseValuesOfParticipants
:
The function signature of increaseValuesOfParticipants
:
The relevant part of the function increaseValuesOfParticipants
is shown below. This function does not currently set isRamSelected=true
when it sets the selectedRam
variable. The diff
indicates one possible way to address the finding:
Please note this should not be considered production ready code. This is indicative of one possible solution and should be considered within the context of the protocol as to the suitability of this as a solution.
Proof of Concept
Standalone test
Test results
References
Tools Used
Manual Review
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.