projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d3d66a
)
Handle existing redirect params.
author
Roger Braun
<roger@rogerbraun.net>
Fri, 10 Nov 2017 17:24:50 +0000
(18:24 +0100)
committer
Roger Braun
<roger@rogerbraun.net>
Fri, 10 Nov 2017 17:24:50 +0000
(18:24 +0100)
lib/pleroma/web/oauth/oauth_controller.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/oauth/oauth_controller.ex
b/lib/pleroma/web/oauth/oauth_controller.ex
index 841df8c32d24d1a5f4b96bf2706f568fd4e61441..e8483dec061ee0338678c13fdaca9c4c553eb34d 100644
(file)
--- a/
lib/pleroma/web/oauth/oauth_controller.ex
+++ b/
lib/pleroma/web/oauth/oauth_controller.ex
@@
-25,7
+25,8
@@
defmodule Pleroma.Web.OAuth.OAuthController do
auth: auth
}
else
- url = "#{redirect_uri}?code=#{auth.token}"
+ connector = if String.contains?(redirect_uri, "?"), do: "&", else: "?"
+ url = "#{redirect_uri}#{connector}code=#{auth.token}"
url = if params["state"] do
url <> "&state=#{params["state"]}"
else