diff options
author | =Corey Hulen <corey@hulen.com> | 2015-09-22 12:12:50 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-09-22 12:12:50 -0700 |
commit | 88e5a71e8c93b495cedaa07931a4f8052d9f12ed (patch) | |
tree | 603174fc3758d56b8a027b9e1fbe1a5d8690b3e6 /api/file.go | |
parent | 08a3acbb44b043b9bb56f9b96e91432352d06d1a (diff) | |
download | chat-88e5a71e8c93b495cedaa07931a4f8052d9f12ed.tar.gz chat-88e5a71e8c93b495cedaa07931a4f8052d9f12ed.tar.bz2 chat-88e5a71e8c93b495cedaa07931a4f8052d9f12ed.zip |
Adding service settings to admin console
Diffstat (limited to 'api/file.go')
-rw-r--r-- | api/file.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/file.go b/api/file.go index 61d0df413..c85d241f3 100644 --- a/api/file.go +++ b/api/file.go @@ -399,7 +399,7 @@ func getFile(c *Context, w http.ResponseWriter, r *http.Request) { asyncGetFile(path, fileData) if len(hash) > 0 && len(data) > 0 && len(teamId) == 26 { - if !model.ComparePassword(hash, fmt.Sprintf("%v:%v", data, utils.Cfg.ServiceSettings.PublicLinkSalt)) { + if !model.ComparePassword(hash, fmt.Sprintf("%v:%v", data, utils.Cfg.ImageSettings.PublicLinkSalt)) { c.Err = model.NewAppError("getFile", "The public link does not appear to be valid", "") return } @@ -477,7 +477,7 @@ func getPublicLink(c *Context, w http.ResponseWriter, r *http.Request) { newProps["time"] = fmt.Sprintf("%v", model.GetMillis()) data := model.MapToJson(newProps) - hash := model.HashPassword(fmt.Sprintf("%v:%v", data, utils.Cfg.ServiceSettings.PublicLinkSalt)) + hash := model.HashPassword(fmt.Sprintf("%v:%v", data, utils.Cfg.ImageSettings.PublicLinkSalt)) url := fmt.Sprintf("%s/api/v1/files/get/%s/%s/%s?d=%s&h=%s&t=%s", c.GetSiteURL(), channelId, userId, filename, url.QueryEscape(data), url.QueryEscape(hash), c.Session.TeamId) |