From 937ebde29ca84ea369b54e2b398bdd572e427a21 Mon Sep 17 00:00:00 2001 From: buzhimingyonghu <42060366+buzhimingyonghu@users.noreply.github.com> Date: Wed, 4 Dec 2024 19:48:56 +0800 Subject: [PATCH] fix: user ERR NOAUTH in github action (#2962) * fix authrequired bug * init pika.conf * fix InitUser * fix InitUser * fix no userblacklist * fix acl * delete annotation * fix bug --- conf/pika.conf | 1 - src/acl.cc | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/conf/pika.conf b/conf/pika.conf index d4f0efb01..fbf52c30f 100644 --- a/conf/pika.conf +++ b/conf/pika.conf @@ -100,7 +100,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); } }