v0.0.48
This commit is contained in:
parent
7f88a0726c
commit
10ddc7c190
@ -150,9 +150,9 @@ func (ph PassHash) Verify(plainpass string, totp *string) bool {
|
|||||||
|
|
||||||
if version == 4 {
|
if version == 4 {
|
||||||
if !hastotp {
|
if !hastotp {
|
||||||
return bcrypt.CompareHashAndPassword(payload, []byte(plainpass)) != nil
|
return bcrypt.CompareHashAndPassword(payload, []byte(plainpass)) == nil
|
||||||
} else {
|
} else {
|
||||||
return bcrypt.CompareHashAndPassword(payload, []byte(plainpass)) != nil && totpext.Validate(totpsecret, *totp)
|
return bcrypt.CompareHashAndPassword(payload, []byte(plainpass)) == nil && totpext.Validate(totpsecret, *totp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user