aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2017-12-04 22:45:16 +0200
committereal <eal@waifu.club>2017-12-04 22:45:16 +0200
commitc1fa1e8844c8eae1ad7638a2d7f9d00e8cd07ce8 (patch)
treee285537c2a15956de20a5dc650fcfa4ffcddab29 /lib
parentd08a34e88b0d42f403755e1bdbaf015784ebbe74 (diff)
downloadpleroma-c1fa1e8844c8eae1ad7638a2d7f9d00e8cd07ce8.tar.gz
Fix basic auth for passwords with a colon.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/plugs/authentication_plug.ex2
1 files changed, 1 insertions, 1 deletions
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