From 10ddc7c190371c5a26b21768ac7afe5e2fe5588e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Fri, 23 Dec 2022 14:47:16 +0100 Subject: [PATCH] v0.0.48 --- cryptext/passHash.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptext/passHash.go b/cryptext/passHash.go index be32661..015076c 100644 --- a/cryptext/passHash.go +++ b/cryptext/passHash.go @@ -150,9 +150,9 @@ func (ph PassHash) Verify(plainpass string, totp *string) bool { if version == 4 { if !hastotp { - return bcrypt.CompareHashAndPassword(payload, []byte(plainpass)) != nil + return bcrypt.CompareHashAndPassword(payload, []byte(plainpass)) == nil } else { - return bcrypt.CompareHashAndPassword(payload, []byte(plainpass)) != nil && totpext.Validate(totpsecret, *totp) + return bcrypt.CompareHashAndPassword(payload, []byte(plainpass)) == nil && totpext.Validate(totpsecret, *totp) } }