aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/auth/totp_authenticator.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/auth/totp_authenticator.ex')
-rw-r--r--lib/pleroma/web/auth/totp_authenticator.ex3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/pleroma/web/auth/totp_authenticator.ex b/lib/pleroma/web/auth/totp_authenticator.ex
index 98aca9a51..04e489c83 100644
--- a/lib/pleroma/web/auth/totp_authenticator.ex
+++ b/lib/pleroma/web/auth/totp_authenticator.ex
@@ -3,7 +3,6 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Auth.TOTPAuthenticator do
- alias Comeonin.Pbkdf2
alias Pleroma.MFA
alias Pleroma.MFA.TOTP
alias Pleroma.User
@@ -31,7 +30,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.checkpw(code, hash) end)
+ hash_code = Enum.find(codes, fn hash -> Pbkdf2.verify_pass(code, hash) end)
if hash_code do
MFA.invalidate_backup_code(user, hash_code)