aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2017-12-05 09:10:37 +0000
committerlambda <pleromagit@rogerbraun.net>2017-12-05 09:10:37 +0000
commit7f336cb8b102c4dd5045aceebedafa1ca363bd91 (patch)
treee285537c2a15956de20a5dc650fcfa4ffcddab29
parentd08a34e88b0d42f403755e1bdbaf015784ebbe74 (diff)
parentc1fa1e8844c8eae1ad7638a2d7f9d00e8cd07ce8 (diff)
downloadpleroma-7f336cb8b102c4dd5045aceebedafa1ca363bd91.tar.gz
Merge branch 'fix/odd-passwords' into 'develop'
Fix basic auth for passwords with a colon. See merge request pleroma/pleroma!35
-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