commit: 7f336cb8b102c4dd5045aceebedafa1ca363bd91
parent: d08a34e88b0d42f403755e1bdbaf015784ebbe74
Author: lambda <pleromagit@rogerbraun.net>
Date: Tue, 5 Dec 2017 09:10:37 +0000
Merge branch 'fix/odd-passwords' into 'develop'
Fix basic auth for passwords with a colon.
See merge request pleroma/pleroma!35
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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