From 32edb6bd65ed8168356e7e0c2d70fe16f48dd92c Mon Sep 17 00:00:00 2001 From: BarryTong65 Date: Thu, 11 Apr 2024 16:15:01 +0800 Subject: [PATCH] fix: check if BucketExtraInfo is nil --- modular/authenticator/authenticator.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modular/authenticator/authenticator.go b/modular/authenticator/authenticator.go index 7039bdb35..b885fb22a 100644 --- a/modular/authenticator/authenticator.go +++ b/modular/authenticator/authenticator.go @@ -450,8 +450,10 @@ func (a *AuthenticationModular) VerifyAuthentication( } return false, ErrConsensusWithDetail("failed to get bucket extra info from consensus, error: " + err.Error()) } - if bucketExtraInfo.IsRateLimited { - return false, ErrBucketIsRateLimited + if bucketExtraInfo != nil { + if bucketExtraInfo.IsRateLimited { + return false, ErrBucketIsRateLimited + } } spID, err := a.getSPID() if err != nil {