From c1fa1e8844c8eae1ad7638a2d7f9d00e8cd07ce8 Mon Sep 17 00:00:00 2001
From: eal <eal@waifu.club>
Date: Mon, 4 Dec 2017 22:45:16 +0200
Subject: [PATCH] Fix basic auth for passwords with a colon.

---
 lib/pleroma/plugs/authentication_plug.ex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 @@ defp verify(user, password, _user_id) 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