Skip to content

Commit 9018370

Browse files
YuCai18caiyu
andauthored
fix: requirepass allows connection with any non-empty password (#3113)
Co-authored-by: caiyu <[email protected]>
1 parent 7306a46 commit 9018370

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/acl.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,10 @@ void Acl::InitLimitUser(const std::string& bl, bool limit_exist) {
497497
}
498498
if (!pass.empty()) {
499499
u->SetUser(">" + pass);
500+
} else {
501+
//If the userpass password is empty,
502+
//disable the limit user to prevent password-free access
503+
u->SetUser("off");
500504
}
501505
} else {
502506
if (pass.empty()) {

0 commit comments

Comments
 (0)