Skip to content
Snippets Groups Projects
Commit c1fa1e88 authored by eal's avatar eal
Browse files

Fix basic auth for passwords with a colon.

parent d08a34e8
Branches
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment