From 2c49dda147904b14ffb7f8a11ec8f2bc9a205b80 Mon Sep 17 00:00:00 2001 From: caiyu <15260903118@163.com> Date: Fri, 20 Jun 2025 11:42:04 +0800 Subject: [PATCH] fix: requirepass allows connection with any non-empty password (unstable) --- src/acl.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/acl.cc b/src/acl.cc index 04226d811c..23ae9a8963 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -497,6 +497,10 @@ void Acl::InitLimitUser(const std::string& bl, bool limit_exist) { } if (!pass.empty()) { u->SetUser(">" + pass); + } else { + //If the userpass password is empty, + //disable the limit user to prevent password-free access + u->SetUser("off"); } } else { if (pass.empty()) {