From 3a85724c9a8a71b4351c4cdfe32c68892e55cf58 Mon Sep 17 00:00:00 2001 From: Qingyang Hu Date: Thu, 28 Dec 2023 14:47:37 -0500 Subject: [PATCH] GODRIVER-3062 Remove password string from error message. --- x/mongo/driver/auth/scram.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x/mongo/driver/auth/scram.go b/x/mongo/driver/auth/scram.go index f4f069699c..c1238cd6a9 100644 --- a/x/mongo/driver/auth/scram.go +++ b/x/mongo/driver/auth/scram.go @@ -14,7 +14,6 @@ package auth import ( "context" - "fmt" "github.com/xdg-go/scram" "github.com/xdg-go/stringprep" @@ -53,7 +52,7 @@ func newScramSHA1Authenticator(cred *Cred) (Authenticator, error) { func newScramSHA256Authenticator(cred *Cred) (Authenticator, error) { passprep, err := stringprep.SASLprep.Prepare(cred.Password) if err != nil { - return nil, newAuthError(fmt.Sprintf("error SASLprepping password '%s'", cred.Password), err) + return nil, newAuthError("error SASLprepping password", err) } client, err := scram.SHA256.NewClientUnprepped(cred.Username, passprep, "") if err != nil {