aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2018-11-11 05:34:45 +0000
committerkaniini <nenolod@gmail.com>2018-11-11 05:34:45 +0000
commit61d173d37c840df4ddba1e328298bc64508880e0 (patch)
treeae1f33439dbef0768adede03c3b28baea72aafcd /lib
parentf745e823f0acf6e10f777d6b924993f99e26a2c2 (diff)
parent419ed3a0ca62dbcc4ea3985f6561e2aad4b48e5b (diff)
downloadpleroma-61d173d37c840df4ddba1e328298bc64508880e0.tar.gz
Merge branch 'bugfix/oauth-padding' into 'develop'
hotfix: oauth: fix token decode regression Closes #373 See merge request pleroma/pleroma!439
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/oauth/oauth_controller.ex3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex
index 35c158fbb..d03c8b05a 100644
--- a/lib/pleroma/web/oauth/oauth_controller.ex
+++ b/lib/pleroma/web/oauth/oauth_controller.ex
@@ -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