aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api
diff options
context:
space:
mode:
authorkaniini <ariadne@dereferenced.org>2019-07-15 16:13:17 +0000
committerkaniini <ariadne@dereferenced.org>2019-07-15 16:13:17 +0000
commitee5250ae56b5bc0989864420d8e76b0a2734630d (patch)
treee2da3174e75a5c5f4c5ba180ca63a700652466c9 /lib/pleroma/web/common_api
parent6aa5b39837b943a7a8fd5c6d1d617c74e933e088 (diff)
parent105f437ce91e1416f10ad90f56dfd47d16913f40 (diff)
downloadpleroma-ee5250ae56b5bc0989864420d8e76b0a2734630d.tar.gz
Merge branch 'sha512-crypt' into 'develop'
detect and use sha512-crypt for stored password hash. See merge request pleroma/pleroma!1422
Diffstat (limited to 'lib/pleroma/web/common_api')
-rw-r--r--lib/pleroma/web/common_api/utils.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex
index f28a96320..fcc000969 100644
--- a/lib/pleroma/web/common_api/utils.ex
+++ b/lib/pleroma/web/common_api/utils.ex
@@ -6,11 +6,11 @@ defmodule Pleroma.Web.CommonAPI.Utils do
import Pleroma.Web.Gettext
alias Calendar.Strftime
- alias Comeonin.Pbkdf2
alias Pleroma.Activity
alias Pleroma.Config
alias Pleroma.Formatter
alias Pleroma.Object
+ alias Pleroma.Plugs.AuthenticationPlug
alias Pleroma.Repo
alias Pleroma.User
alias Pleroma.Web.ActivityPub.Utils
@@ -388,7 +388,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
def confirm_current_password(user, password) do
with %User{local: true} = db_user <- User.get_cached_by_id(user.id),
- true <- Pbkdf2.checkpw(password, db_user.password_hash) do
+ true <- AuthenticationPlug.checkpw(password, db_user.password_hash) do
{:ok, db_user}
else
_ -> {:error, dgettext("errors", "Invalid password.")}