Commit 2a557f67 by Torkel Ödegaard

Do not set remember me cookie when days are set to zero

parent b8fb8cdc
......@@ -126,8 +126,10 @@ func loginUserWithUser(user *m.User, c *middleware.Context) {
}
days := 86400 * setting.LogInRememberDays
if days > 0 {
c.SetCookie(setting.CookieUserName, user.Login, days, setting.AppSubUrl+"/")
c.SetSuperSecureCookie(util.EncodeMd5(user.Rands+user.Password), setting.CookieRememberName, user.Login, days, setting.AppSubUrl+"/")
}
c.Session.Set(middleware.SESS_KEY_USERID, user.Id)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment