The updateReferrerInfo function is meant to allow a referrer to update the values of the ReferralInfo struct so he can split the referral bonus with his referral, but this function allows anyone except the referrer to change the referral rates.
The updateReferrerInfo function is meant to enable the referrer to update the values of the ReferralInfo struct so he can split the referral bonus with his referrals, but this function allows anyone to update the ReferralInfo data except the referrer who is the owner and should be the only one who can decide how to split the rates of this referral info.
When a referrer wants to update the bonus referral rate between him and his referrals he should be able to call the updateReferrerInfo function to update these values as he wishes, but this function denies this access to the referrer on his first if, so the referrer can't change his own values, but any other user can do it.
This test shows that the referrer can't call the updateReferrerInfo function to update his referral rates info, but another user can update the referral info of the referrer.
The referrer can't update his own ReferralInfo struct data, but other users can.
Manual review
if this function should be callable only by the owner add the corresponding modifier, if this function should be called only by the referrer correct the first if of the function to allow only the referrer to call this function.
Valid high severity. There are two impacts here due to the wrong setting of the `refferalInfoMap` mapping. 1. Wrong refferal info is always set, so the refferal will always be delegated to the refferer address instead of the caller 2. Anybody can arbitrarily change the referrer and referrer rate of any user, resulting in gaming of the refferal system I prefer #1500 description the most, be cause it seems to be the only issue although without a poc to fully describe all of the possible impacts
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.