修复几处bug
This commit is contained in:
georgehao
2021-05-18 00:31:24 +08:00
parent 78efeef490
commit 5fbc2bbe6e
16 changed files with 73 additions and 38 deletions

View File

@@ -50,7 +50,7 @@ func (self *LoginController) LoginIn() {
user.LastIp = self.getClientIp()
user.LastLogin = time.Now().Unix()
user.Update()
authkey := libs.Md5([]byte(user.Password + user.Salt))
authkey := libs.Md5([]byte(self.getClientIp() + "|" + user.Password + user.Salt))
self.Ctx.SetCookie("auth", strconv.Itoa(user.Id)+"|"+authkey, 7*86400)
self.ajaxMsg("登录成功", MSG_OK)