X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fplugs%2Fauthentication_plug.ex;h=60f6faf494496b0e7085134c35b48ff173340283;hb=0ec5aeb8a76653935caefa0de92861269f98f343;hp=14654f2e6ff6f73aa8d7aa86cc6872e914b139f4;hpb=70024632ba32121bd63a439b2d708d4b4ff1a190;p=akkoma diff --git a/lib/pleroma/plugs/authentication_plug.ex b/lib/pleroma/plugs/authentication_plug.ex index 14654f2e6..60f6faf49 100644 --- a/lib/pleroma/plugs/authentication_plug.ex +++ b/lib/pleroma/plugs/authentication_plug.ex @@ -12,6 +12,7 @@ defmodule Pleroma.Plugs.AuthenticationPlug do def call(conn, opts) do with {:ok, username, password} <- decode_header(conn), {:ok, user} <- opts[:fetcher].(username), + false <- !!user.info["deactivated"], saved_user_id <- get_session(conn, :user_id), {:ok, verified_user} <- verify(user, password, saved_user_id) do @@ -44,7 +45,7 @@ defmodule Pleroma.Plugs.AuthenticationPlug do defp decode_header(conn) do with ["Basic " <> header] <- get_req_header(conn, "authorization"), {:ok, userinfo} <- Base.decode64(header), - [username, password] <- String.split(userinfo, ":") + [username, password] <- String.split(userinfo, ":", parts: 2) do {:ok, username, password} end