summaryrefslogtreecommitdiffstats
path: root/app/post.go
diff options
context:
space:
mode:
authorJonathan Fritz <jonathan.fritz@mattermost.com>2018-02-13 08:39:56 -0500
committerJonathan Fritz <jonathan.fritz@mattermost.com>2018-02-13 08:39:56 -0500
commit18fa32567b56584c6e24da2ae68814d5bf8ece6f (patch)
tree311ab6a3918ba64ac665286f15950b32dc1b1dba /app/post.go
parent7b2861de3a09cf00d00b0872cc537d54302c4bfa (diff)
parent8b79f5d49cb8d4877e136a76e515edef41ef6f28 (diff)
downloadchat-18fa32567b56584c6e24da2ae68814d5bf8ece6f.tar.gz
chat-18fa32567b56584c6e24da2ae68814d5bf8ece6f.tar.bz2
chat-18fa32567b56584c6e24da2ae68814d5bf8ece6f.zip
Merge branch 'release-4.7' into XYZ-110
Diffstat (limited to 'app/post.go')
-rw-r--r--app/post.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/app/post.go b/app/post.go
index 1964bd3cf..a541797fa 100644
--- a/app/post.go
+++ b/app/post.go
@@ -6,8 +6,6 @@ package app
import (
"crypto/hmac"
"crypto/sha1"
- "crypto/sha256"
- "encoding/base64"
"encoding/hex"
"encoding/json"
"fmt"
@@ -950,18 +948,6 @@ func (a *App) ImageProxyAdder() func(string) string {
mac.Write([]byte(url))
digest := hex.EncodeToString(mac.Sum(nil))
return proxyURL + digest + "/" + hex.EncodeToString([]byte(url))
- case "willnorris/imageproxy":
- options := strings.Split(options, "|")
- if len(options) > 1 {
- mac := hmac.New(sha256.New, []byte(options[1]))
- mac.Write([]byte(url))
- digest := base64.URLEncoding.EncodeToString(mac.Sum(nil))
- if options[0] == "" {
- return proxyURL + "s" + digest + "/" + url
- }
- return proxyURL + options[0] + ",s" + digest + "/" + url
- }
- return proxyURL + options[0] + "/" + url
}
return url
@@ -984,12 +970,6 @@ func (a *App) ImageProxyRemover() (f func(string) string) {
}
}
}
- case "willnorris/imageproxy":
- if strings.HasPrefix(url, proxyURL) {
- if slash := strings.IndexByte(url[len(proxyURL):], '/'); slash >= 0 {
- return url[len(proxyURL)+slash+1:]
- }
- }
}
return url