Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

owner should not be allowed to set empty string as password

Title

empty string should not be accepted as password

Bug

an empty string is the most vulnerable, unsafe and worst password someone could choose, the setPassword function doesn't have any checks to ensure newPassword entered by owner is not an empty string

POC

owner here is trying to set empty string as password and it successfully gets updated

function test_empty_string_gets_accepted_as_password() public {
vm.startPrank(owner);
string memory newPassword = "";
passwordStore.setPassword(newPassword);
}

Fix / Suggestions

there should be checks applied on the password, for ex: s_password.length>0 or if the password contains mix of characters and numbers to ensure it's safe

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 2 years ago
inallhonesty Lead Judge about 2 years ago
Submission Judgement Published
Invalidated
Reason: Admin Input/call validation

Support

FAQs

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