oauth: fix token decode regression
authorWilliam Pitcock <nenolod@dereferenced.org>
Sun, 11 Nov 2018 05:11:27 +0000 (05:11 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sun, 11 Nov 2018 05:26:39 +0000 (05:26 +0000)
lib/pleroma/web/oauth/oauth_controller.ex

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