Direct casting of bytes
to string
could lead to misattributed referrals or failure to recognize valid custom referral codes
The createTradingAccount
function accepts a bytes memory referralCode
parameter, which is then directly cast to a string
when calling CustomReferralConfiguration.load(string(referralCode))
.
The conversion from bytes
to a string
requires that the bytes are in UTF-8
format. Even if the bytes
data is valid UTF-8
, it might not represent the intended string. Misinterpreting the bytes as a string can lead to incorrect referral code processing.
If the bytes
data in referralCode
is misinterpreted as a string
, it could result in misattributed referrals or failure to recognize valid custom referral codes.
Manual Review
use abi.decode
to safely convert bytes
to string
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.