diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-05-14 08:42:27 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-05-14 08:57:38 -0500 |
commit | 5b0f27d23d8f60d2e12c0556c56fdb52809398eb (patch) | |
tree | f0a6e0761f836d8e667e8d7f65e7e993aede343b /lib/pleroma/web/auth | |
parent | 9cbf17d59fe34a760f8a4f94bc60f78b38ccba06 (diff) | |
download | pleroma-5b0f27d23d8f60d2e12c0556c56fdb52809398eb.tar.gz |
Pbkdf2.verify_pass --> AuthenticationPlug.checkpw
Diffstat (limited to 'lib/pleroma/web/auth')
-rw-r--r-- | lib/pleroma/web/auth/totp_authenticator.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/auth/totp_authenticator.ex b/lib/pleroma/web/auth/totp_authenticator.ex index 04e489c83..ce8a76219 100644 --- a/lib/pleroma/web/auth/totp_authenticator.ex +++ b/lib/pleroma/web/auth/totp_authenticator.ex @@ -5,6 +5,7 @@ defmodule Pleroma.Web.Auth.TOTPAuthenticator do alias Pleroma.MFA alias Pleroma.MFA.TOTP + alias Pleroma.Plugs.AuthenticationPlug alias Pleroma.User @doc "Verify code or check backup code." @@ -30,7 +31,7 @@ defmodule Pleroma.Web.Auth.TOTPAuthenticator do code ) when is_list(codes) and is_binary(code) do - hash_code = Enum.find(codes, fn hash -> Pbkdf2.verify_pass(code, hash) end) + hash_code = Enum.find(codes, fn hash -> AuthenticationPlug.checkpw(code, hash) end) if hash_code do MFA.invalidate_backup_code(user, hash_code) |