The load function does not validate the customReferralCode parameter, leading to potential issues if an empty string or malicious input is provided.
Code Reference:
Copy this fuzz test to test folder
Run forge test --match-contract CustomReferralConfigurationTest -vvv
Output: [FAIL. Reason: call did not revert as expected; counterexample: calldata=0xd2b3fb1e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000 args=[""]] testEmptyStringInput(string) (runs: 0, μ: 0, ~: 0)
The error message indicates that the test expected a revert when an empty string is passed, but it did not revert. This suggests that the function being tested does not handle empty strings correctly.
Severity: Low
However, the lack of input validation can still lead to several issues:
Unintended Behavior: Using empty or invalid strings may lead to unintended storage slot calculations.
Storage Inconsistency: Potential for generating the same storage slot for different inputs under certain conditions, leading to data inconsistency.
Security Vulnerabilities: Though less likely, if combined with other vulnerabilities, this could become a significant security risk.
Manual Review
Implement Input Validation:
Ensure that customReferralCode is neither empty nor formatted in a potentially harmful manner.
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.