diff options
author | feld <feld@feld.me> | 2020-09-02 17:11:24 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2020-09-02 17:11:24 +0000 |
commit | d1a6f67b1d92e17f4fe3cfc8f296879326897220 (patch) | |
tree | 50fbbe1bf517ab94bd9ce6047f147a3d13f51798 /lib/pleroma/web/mastodon_api/controllers | |
parent | 0ab03e856480c35ce9478d086f103b396a8e7453 (diff) | |
parent | cbf7f0e02943f44a73f4418b8c6a8bada06331d8 (diff) | |
download | pleroma-d1a6f67b1d92e17f4fe3cfc8f296879326897220.tar.gz |
Merge branch 'fix/2095-deactivated-account-reset' into 'develop'
Disallow password resets for deactivated accounts
Closes #2095
See merge request pleroma/pleroma!2935
Diffstat (limited to 'lib/pleroma/web/mastodon_api/controllers')
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/auth_controller.ex | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex b/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex index 753b3db3e..9f09550e1 100644 --- a/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex @@ -59,17 +59,11 @@ defmodule Pleroma.Web.MastodonAPI.AuthController do def password_reset(conn, params) do nickname_or_email = params["email"] || params["nickname"] - with {:ok, _} <- TwitterAPI.password_reset(nickname_or_email) do - conn - |> put_status(:no_content) - |> json("") - else - {:error, "unknown user"} -> - send_resp(conn, :not_found, "") - - {:error, _} -> - send_resp(conn, :bad_request, "") - end + TwitterAPI.password_reset(nickname_or_email) + + conn + |> put_status(:no_content) + |> json("") end defp local_mastodon_root_path(conn) do |