diff --git a/conf/pika.conf b/conf/pika.conf index 56c9ccdbd..4c82b1251 100644 --- a/conf/pika.conf +++ b/conf/pika.conf @@ -96,7 +96,6 @@ timeout : 60 # The [password of administrator], which is empty by default. # [NOTICE] If this admin password is the same as user password (including both being empty), -# the value of userpass will be ignored and all users are considered as administrators, # in this scenario, users are not subject to the restrictions imposed by the userblacklist. # PS: "user password" refers to value of the parameter below: userpass. requirepass : diff --git a/src/acl.cc b/src/acl.cc index dad50f73e..04226d811 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -477,11 +477,7 @@ void Acl::UpdateDefaultUserPassword(const std::string& pass) { if (pass.empty()) { u->SetUser("nopass"); } else { - if (g_pika_conf->userpass().empty()) { - u->SetUser("nopass"); - } else { - u->SetUser(">" + pass); - } + u->SetUser(">" + pass); } }