1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-29 02:45:19 +01:00

Merge branch 'fix/odd-passwords' into 'develop'

Fix basic auth for passwords with a colon.

See merge request pleroma/pleroma!35
This commit is contained in:
lambda 2017-12-05 09:10:37 +00:00
commit 7f336cb8b1

View File

@ -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