diff options
author | Chris <ccbrown112@gmail.com> | 2017-08-09 15:49:07 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-08-09 13:49:07 -0700 |
commit | ffbf8e51fe0b80b39fa76535f96c9179b2fcc0a1 (patch) | |
tree | 5f29ad6b3ae1c26a05a827406e9fe8c0385d26d6 /api/post_test.go | |
parent | 504582b824d07946c7fb43eb2a8f0aadb15a3677 (diff) | |
download | chat-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 'api/post_test.go')
-rw-r--r-- | api/post_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/api/post_test.go b/api/post_test.go index c7bd7a04c..a48ad4f51 100644 --- a/api/post_test.go +++ b/api/post_test.go @@ -188,10 +188,13 @@ func testCreatePostWithOutgoingHook( channel := th.CreateChannel(Client, team) enableOutgoingHooks := utils.Cfg.ServiceSettings.EnableOutgoingWebhooks + allowedInternalConnections := *utils.Cfg.ServiceSettings.AllowedUntrustedInternalConnections defer func() { utils.Cfg.ServiceSettings.EnableOutgoingWebhooks = enableOutgoingHooks + utils.Cfg.ServiceSettings.AllowedUntrustedInternalConnections = &allowedInternalConnections }() utils.Cfg.ServiceSettings.EnableOutgoingWebhooks = true + *utils.Cfg.ServiceSettings.AllowedUntrustedInternalConnections = "localhost 127.0.0.1" var hook *model.OutgoingWebhook var post *model.Post @@ -1359,10 +1362,13 @@ func TestGetOpenGraphMetadata(t *testing.T) { Client := th.BasicClient enableLinkPreviews := *utils.Cfg.ServiceSettings.EnableLinkPreviews + allowedInternalConnections := *utils.Cfg.ServiceSettings.AllowedUntrustedInternalConnections defer func() { *utils.Cfg.ServiceSettings.EnableLinkPreviews = enableLinkPreviews + utils.Cfg.ServiceSettings.AllowedUntrustedInternalConnections = &allowedInternalConnections }() *utils.Cfg.ServiceSettings.EnableLinkPreviews = true + *utils.Cfg.ServiceSettings.AllowedUntrustedInternalConnections = "localhost 127.0.0.1" ogDataCacheMissCount := 0 |