From: eal Date: Mon, 4 Dec 2017 20:45:16 +0000 (+0200) Subject: Fix basic auth for passwords with a colon. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=c1fa1e8844c8eae1ad7638a2d7f9d00e8cd07ce8;p=akkoma Fix basic auth for passwords with a colon. --- diff --git a/lib/pleroma/plugs/authentication_plug.ex b/lib/pleroma/plugs/authentication_plug.ex index 14654f2e6..beb02eb88 100644 --- a/lib/pleroma/plugs/authentication_plug.ex +++ b/lib/pleroma/plugs/authentication_plug.ex @@ -44,7 +44,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