projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request 'update backwards compat notice in admin_api.md' (#473) from flisk...
[akkoma]
/
lib
/
pleroma
/
web
/
auth
/
totp_authenticator.ex
diff --git
a/lib/pleroma/web/auth/totp_authenticator.ex
b/lib/pleroma/web/auth/totp_authenticator.ex
index 98aca9a511dbcea27ada8b8414294c796540b0a5..e6f839e6ea6e2be1462764602945acda7eac8210 100644
(file)
--- a/
lib/pleroma/web/auth/totp_authenticator.ex
+++ b/
lib/pleroma/web/auth/totp_authenticator.ex
@@
-1,9
+1,8
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
21
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Auth.TOTPAuthenticator do
# 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
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
code
)
when is_list(codes) and is_binary(code) do
- hash_code = Enum.find(codes, fn hash -> P
bkdf2
.checkpw(code, hash) end)
+ hash_code = Enum.find(codes, fn hash -> P
leroma.Password
.checkpw(code, hash) end)
if hash_code do
MFA.invalidate_backup_code(user, hash_code)
if hash_code do
MFA.invalidate_backup_code(user, hash_code)