summaryrefslogtreecommitdiffstats
path: root/app/oauth.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-08-09 15:49:07 -0500
committerChristopher Speller <crspeller@gmail.com>2017-08-09 13:49:07 -0700
commitffbf8e51fe0b80b39fa76535f96c9179b2fcc0a1 (patch)
tree5f29ad6b3ae1c26a05a827406e9fe8c0385d26d6 /app/oauth.go
parent504582b824d07946c7fb43eb2a8f0aadb15a3677 (diff)
downloadchat-ffbf8e51fe0b80b39fa76535f96c9179b2fcc0a1.tar.gz
chat-ffbf8e51fe0b80b39fa76535f96c9179b2fcc0a1.tar.bz2
chat-ffbf8e51fe0b80b39fa76535f96c9179b2fcc0a1.zip
PLT-6358: Server HTTP client improvements (#6980)
* restrict untrusted, internal http connections by default * command test fix * more test fixes * change setting from toggle to whitelist * requested ui changes * add isdefault diagnostic * fix tests
Diffstat (limited to 'app/oauth.go')
-rw-r--r--app/oauth.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/oauth.go b/app/oauth.go
index 4174f8146..d9129dd6f 100644
--- a/app/oauth.go
+++ b/app/oauth.go
@@ -673,7 +673,7 @@ func AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, service, code, s
var ar *model.AccessResponse
var bodyBytes []byte
- if resp, err := utils.HttpClient().Do(req); err != nil {
+ if resp, err := utils.HttpClient(true).Do(req); err != nil {
return nil, "", stateProps, model.NewLocAppError("AuthorizeOAuthUser", "api.user.authorize_oauth_user.token_failed.app_error", nil, err.Error())
} else {
bodyBytes, _ = ioutil.ReadAll(resp.Body)
@@ -702,7 +702,7 @@ func AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, service, code, s
req.Header.Set("Accept", "application/json")
req.Header.Set("Authorization", "Bearer "+ar.AccessToken)
- if resp, err := utils.HttpClient().Do(req); err != nil {
+ if resp, err := utils.HttpClient(true).Do(req); err != nil {
return nil, "", stateProps, model.NewLocAppError("AuthorizeOAuthUser", "api.user.authorize_oauth_user.service.app_error",
map[string]interface{}{"Service": service}, err.Error())
} else {