From 747ef5656c8c1e6ef3ff71a4dd2edc2444ca8a89 Mon Sep 17 00:00:00 2001 From: uubulb Date: Thu, 26 Dec 2024 22:49:38 +0800 Subject: [PATCH] cleanup --- service/rpc/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/rpc/auth.go b/service/rpc/auth.go index d91bf6d..fa601dd 100644 --- a/service/rpc/auth.go +++ b/service/rpc/auth.go @@ -38,7 +38,7 @@ func (a *authHandler) Check(ctx context.Context) (uint64, error) { singleton.UserLock.RLock() userId, ok := singleton.AgentSecretToUserId[clientSecret] - if !ok && clientSecret != singleton.Conf.AgentSecretKey { + if !ok { singleton.UserLock.RUnlock() model.BlockIP(singleton.DB, ip, model.WAFBlockReasonTypeAgentAuthFail, model.BlockIDgRPC) return 0, status.Error(codes.Unauthenticated, "客户端认证失败")