Argon2 password support

This commit is contained in:
marcin mikołajczak 2024-09-08 05:23:46 +03:00 committed by Mint
commit c9b28eaf9a
3 changed files with 6 additions and 0 deletions

View file

@ -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