diff options
author | Moonman <shitposterclub@gmail.com> | 2019-07-14 09:48:42 -0700 |
---|---|---|
committer | Moonman <shitposterclub@gmail.com> | 2019-07-14 09:48:42 -0700 |
commit | f98f7ad1b9c1aede0ddefecfefb73919564d73ed (patch) | |
tree | b8e30db8cd1fc01f88e3bc3b0669830189922c41 /lib/pleroma/web/common_api/utils.ex | |
parent | cef4337f950cca5ca9c9dec313efeb8f43aa5a40 (diff) | |
download | pleroma-f98f7ad1b9c1aede0ddefecfefb73919564d73ed.tar.gz |
detect and use sha512-crypt for stored password hash.
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 4 |
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 8e482eef7..e013188cf 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 @@ -371,7 +371,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.")} |