oauth: fix token decode regression

This commit is contained in:
William Pitcock 2018-11-11 05:11:27 +00:00
parent f745e823f0
commit 419ed3a0ca

View File

@ -143,8 +143,11 @@ defmodule Pleroma.Web.OAuth.OAuthController do
end end
end end
# XXX - for whatever reason our token arrives urlencoded, but Plug.Conn should be
# decoding it. Investigate sometime.
defp fix_padding(token) do defp fix_padding(token) do
token token
|> URI.decode()
|> Base.url_decode64!(padding: false) |> Base.url_decode64!(padding: false)
|> Base.url_encode64() |> Base.url_encode64()
end end