From a6a84e6f677447342e8c5984fdc0b52241b92ce3 Mon Sep 17 00:00:00 2001 From: yzh <snbbt@21cn.com> Date: 星期四, 30 六月 2022 01:20:34 +0800 Subject: [PATCH] 客户管理分配个性产品优化、返回URL优化 --- web/web/Session.ashx | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/web/web/Session.ashx b/web/web/Session.ashx index abb9f06..cb47d97 100644 --- a/web/web/Session.ashx +++ b/web/web/Session.ashx @@ -89,11 +89,17 @@ string account = context.SessionObject.Account; if (string.IsNullOrEmpty(account)) throw new ArgumentException("鑾峰彇璐︽埛淇℃伅鍑洪敊,璇烽噸鏂扮櫥褰曪紒"); + this.dao.GetUser(account); SysUser userInfo = this.dao.GetUserInfo(context.SessionObject.UserID); + + string1 += userInfo.Salt; + string str = userInfo.Password == DataHelper.MD5Hex(string1) ? userInfo.Password : string1; if (!string.Equals(context.SessionObject.Password, str)) throw new ArgumentException("鍘熷瀵嗙爜涓嶆纭紝璇烽噸鏂拌緭鍏ワ紒"); + + string3 += userInfo.Salt; if (this.dao.UpdatePassword(context.SessionObject.UserID, str, DataHelper.MD5Hex(string3))) context.SessionObject.Password = DataHelper.MD5Hex(string3); return new JsonPageResult(true, (object) "瀵嗙爜鏇存柊鎴愬姛锛�"); @@ -129,6 +135,8 @@ try { + user = this.dao.GetUser(string2); + string3 += user.Salt; if (!this.dao.CheckLogin(string2, string3, user)) return new JsonPageResult(false, (object)new { @@ -137,13 +145,13 @@ }); } catch (Exception ex) - { - return new JsonPageResult(false, (object)new - { - Content = "寮傚父锛�"+ex.Message, - Tstatus = num - }); - } + { + return new JsonPageResult(false, (object)new + { + Content = "寮傚父锛�"+ex.Message, + Tstatus = num + }); + } context.SessionObject = user; string clientIp = user.ClientIp; if (user.IsVerification == 1 && !context.ClientIP.Equals(clientIp)) -- Gitblit v1.9.1