Argon2 password support
This commit is contained in:
parent
bb0cb06d8a
commit
c9b28eaf9a
3 changed files with 6 additions and 0 deletions
|
|
@ -47,6 +47,10 @@ defmodule Pleroma.Web.Plugs.AuthenticationPlug do
|
|||
Pleroma.Password.Pbkdf2.verify_pass(password, password_hash)
|
||||
end
|
||||
|
||||
def checkpw(password, "$argon2" <> _ = password_hash) do
|
||||
Argon2.verify_pass(password, password_hash)
|
||||
end
|
||||
|
||||
def checkpw(_password, _password_hash) do
|
||||
Logger.error("Password hash not recognized")
|
||||
false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue