diff options
author | =Corey Hulen <corey@hulen.com> | 2016-02-01 14:44:17 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-02-01 14:44:17 -0800 |
commit | b4ec6900510077253290e361d1a706e5368a45de (patch) | |
tree | 6fc7c131fa7aa5f32e3aba8102416aa23c65963d /api/file.go | |
parent | ea71731f838fc010cfc7511c09875184d1b2396b (diff) | |
parent | f28486c4553f7f4bccf7bf69153c2f12699705f9 (diff) | |
download | chat-b4ec6900510077253290e361d1a706e5368a45de.tar.gz chat-b4ec6900510077253290e361d1a706e5368a45de.tar.bz2 chat-b4ec6900510077253290e361d1a706e5368a45de.zip |
Fixing merge
Diffstat (limited to 'api/file.go')
-rw-r--r-- | api/file.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/api/file.go b/api/file.go index 44ae775c9..7dcfc691f 100644 --- a/api/file.go +++ b/api/file.go @@ -398,13 +398,6 @@ func getFile(c *Context, w http.ResponseWriter, r *http.Request) { c.Err = model.NewLocAppError("getFile", "api.file.get_file.public_invalid.app_error", nil, "") return } - props := model.MapFromJson(strings.NewReader(data)) - - t, err := strconv.ParseInt(props["time"], 10, 64) - if err != nil || model.GetMillis()-t > 1000*60*60*24*7 { // one week - c.Err = model.NewLocAppError("getFile", "api.file.get_file.public_expired.app_error", nil, "") - return - } } else if !c.HasPermissionsToChannel(cchan, "getFile") { return } @@ -484,7 +477,6 @@ func getPublicLink(c *Context, w http.ResponseWriter, r *http.Request) { newProps := make(map[string]string) newProps["filename"] = filename - newProps["time"] = fmt.Sprintf("%v", model.GetMillis()) data := model.MapToJson(newProps) hash := model.HashPassword(fmt.Sprintf("%v:%v", data, utils.Cfg.FileSettings.PublicLinkSalt)) |