1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-19 03:19:17 +00:00

Fix basic auth for passwords with a colon.

This commit is contained in:
eal 2017-12-04 22:45:16 +02:00
parent d08a34e88b
commit c1fa1e8844

View file

@ -44,7 +44,7 @@ defp verify(user, password, _user_id) 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