This is an automated email from the ASF dual-hosted git repository.

tianxiaoliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git


The following commit(s) were added to refs/heads/master by this push:
     new 52bd9df  bug fix: wont print log, it password is wrong (#903)
52bd9df is described below

commit 52bd9df7a9a94abc69dcc7caea1ec27236c0d8f9
Author: Shawn <[email protected]>
AuthorDate: Thu Mar 18 17:09:24 2021 +0800

    bug fix: wont print log, it password is wrong (#903)
---
 pkg/privacy/password.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/privacy/password.go b/pkg/privacy/password.go
index b84761f..66f4ae2 100644
--- a/pkg/privacy/password.go
+++ b/pkg/privacy/password.go
@@ -54,7 +54,7 @@ func SamePassword(hashedPwd, pwd string) bool {
                return err == nil
        }
        err := scrypt.CompareHashAndPassword([]byte(hashedPwd), []byte(pwd))
-       if err == bcrypt.ErrMismatchedHashAndPassword {
+       if err == scrypt.ErrMismatchedHashAndPassword {
                log.Warn("incorrect password attempts")
        }
        return err == nil

Reply via email to