aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-05-17 11:53:17 +0200
committerlain <lain@soykaf.club>2020-05-17 11:53:17 +0200
commit8bfd9710ae70204b29e184f08d78b95a2f81ad6c (patch)
tree2a045e23969e2ce2df5e2cbd7d5b31b9a4b6d80c /lib/pleroma/web
parentbfdd90f6d7c9bb85e572033070d6fa7efda8aeac (diff)
downloadpleroma-8bfd9710ae70204b29e184f08d78b95a2f81ad6c.tar.gz
Pleroma Authenticator: Also update passwords here.
Diffstat (limited to 'lib/pleroma/web')
-rw-r--r--lib/pleroma/web/auth/pleroma_authenticator.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/auth/pleroma_authenticator.ex b/lib/pleroma/web/auth/pleroma_authenticator.ex
index a8f554aa3..200ca03dc 100644
--- a/lib/pleroma/web/auth/pleroma_authenticator.ex
+++ b/lib/pleroma/web/auth/pleroma_authenticator.ex
@@ -16,7 +16,8 @@ defmodule Pleroma.Web.Auth.PleromaAuthenticator do
def get_user(%Plug.Conn{} = conn) do
with {:ok, {name, password}} <- fetch_credentials(conn),
{_, %User{} = user} <- {:user, fetch_user(name)},
- {_, true} <- {:checkpw, AuthenticationPlug.checkpw(password, user.password_hash)} do
+ {_, true} <- {:checkpw, AuthenticationPlug.checkpw(password, user.password_hash)},
+ {:ok, user} <- AuthenticationPlug.maybe_update_password(user, password) do
{:ok, user}
else
{:error, _reason} = error -> error