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:
commit
7f336cb8b1
|
@ -44,7 +44,7 @@ defp verify(user, password, _user_id) do
|
||||||
defp decode_header(conn) do
|
defp decode_header(conn) do
|
||||||
with ["Basic " <> header] <- get_req_header(conn, "authorization"),
|
with ["Basic " <> header] <- get_req_header(conn, "authorization"),
|
||||||
{:ok, userinfo} <- Base.decode64(header),
|
{:ok, userinfo} <- Base.decode64(header),
|
||||||
[username, password] <- String.split(userinfo, ":")
|
[username, password] <- String.split(userinfo, ":", parts: 2)
|
||||||
do
|
do
|
||||||
{:ok, username, password}
|
{:ok, username, password}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue