mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Stronger passwordless account checks (fixes #2780)
This commit is contained in:
parent
f1b8df0f49
commit
980fa55846
2 changed files with 5 additions and 0 deletions
|
@ -75,6 +75,9 @@ func (d *Database) GetAccountByPassword(
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if hash == "" {
|
||||
return nil, bcrypt.ErrHashTooShort
|
||||
}
|
||||
if err := bcrypt.CompareHashAndPassword([]byte(hash), []byte(plaintextPassword)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue