diff options
author | Chris <ccbrown112@gmail.com> | 2017-09-20 08:34:30 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-09-20 09:34:30 -0400 |
commit | 2d322a41749849e62eeeb2d0de61b1e94b83b46d (patch) | |
tree | 0892be6b6ab371e7beacd358c6821edc861f312f /api4 | |
parent | ac74066f0e4f3d62f2d4645c3fa34b88c13958d1 (diff) | |
download | chat-2d322a41749849e62eeeb2d0de61b1e94b83b46d.tar.gz chat-2d322a41749849e62eeeb2d0de61b1e94b83b46d.tar.bz2 chat-2d322a41749849e62eeeb2d0de61b1e94b83b46d.zip |
fix error message escaping (#7467)
Diffstat (limited to 'api4')
-rw-r--r-- | api4/oauth.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api4/oauth.go b/api4/oauth.go index c3b64b608..10972fe07 100644 --- a/api4/oauth.go +++ b/api4/oauth.go @@ -464,7 +464,7 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) { if action == model.OAUTH_ACTION_MOBILE { w.Write([]byte(err.ToJson())) } else { - http.Redirect(w, r, c.GetSiteURLHeader()+"/error?message="+err.Message, http.StatusTemporaryRedirect) + http.Redirect(w, r, c.GetSiteURLHeader()+"/error?message="+url.QueryEscape(err.Message), http.StatusTemporaryRedirect) } return } @@ -476,7 +476,7 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) { if action == model.OAUTH_ACTION_MOBILE { w.Write([]byte(err.ToJson())) } else { - http.Redirect(w, r, c.GetSiteURLHeader()+"/error?message="+err.Message, http.StatusTemporaryRedirect) + http.Redirect(w, r, c.GetSiteURLHeader()+"/error?message="+url.QueryEscape(err.Message), http.StatusTemporaryRedirect) } return } |