Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

个人中心仅更新用户昵称会导致密码被修改 #85

Closed
qxs820624 opened this issue May 16, 2020 · 0 comments
Closed

个人中心仅更新用户昵称会导致密码被修改 #85

qxs820624 opened this issue May 16, 2020 · 0 comments

Comments

@qxs820624
Copy link

分别在apis/system/sysuser.go UpdateSysUser 的 tools.GetUserIdStr 前后打印上下文和data,发现密码是之前的密码,在data.Update中打印,密码被修改了
2020/05/17 07:00:01 UpdateSysUser c and data
Keys: map[JWT_PAYLOAD:map[datascope: exp:1.589672385e+09 identity:1 nice:admin orig_iat:1.589668785e+09 roleid:1 rolekey:admin rolename:系统管理员] JWT_TOKEN:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhc2NvcGUiOiIiLCJleHAiOjE1ODk2NzIzODUsImlkZW50aXR5IjoxLCJuaWNlIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTU4OTY2ODc4NSwicm9sZWlkIjoxLCJyb2xla2V5IjoiYWRtaW4iLCJyb2xlbmFtZSI6Iuezu-e7n-euoeeQhuWRmCJ9.LcOsu_ZBbKnnmAtElcFX64bE6OFMNCZxkc2K9UwCpe0 X-Request-Id:744d82f0-da05-495b-8e73-f388735c876e dataScope: identity:map[DataScope: IdentityKey:1 RoleIds:1 RoleKey:admin UserId:1 UserName:admin] role: roleIds:0 userId:0 userName:{Username:}]
Params: []
PassWord: {Password:$2a$10$cKFFTCzGOvaIHHJY2K45Zuwt8TD6oPzYi4s5MzYIBAWCLL6ZhouP2}

2020/05/17 07:00:01 UpdateSysUser data {SysUserId:{UserId:1} SysUserB:{NickName:管理员3 Phone:13818888888 RoleId:1
Salt: Avatar: Sex:0 Email:13818888888@qq.com DeptId:1 PostId:1 CreateBy:1 UpdateBy:1 Remark: Status:0 DataScope: Params: BaseModel:{CreatedAt:2019-11-10 14:05:55 +0800 CST UpdatedAt:2020-05-16 21:10:09 +0800 CST DeletedAt:}}
LoginM:{UserName:{Username:admin} PassWord:{Password:$2a$10$cKFFTCzGOvaIHHJY2K45Zuwt8TD6oPzYi4s5MzYIBAWCLL6ZhouP2}}}

2020/05/17 07:00:02 Sysuser1: &{SysUserId:{UserId:1} SysUserB:{NickName:管理员3 Phone:13818888888 RoleId:1 Salt:
Avatar: Sex:0 Email:13818888888@qq.com DeptId:1 PostId:1 CreateBy:1 UpdateBy:1 Remark: Status:0 DataScope: Params:
BaseModel:{CreatedAt:2019-11-10 14:05:55 +0800 CST UpdatedAt:2020-05-16 21:10:09 +0800 CST DeletedAt:}} LoginM:{UserName:{Username:admin} PassWord:{Password:$2a$10$GxDu7R9zzpgft7xFjIEKxu0Sbe.7hYL0VEBMeg080g0idqYM1dj/e}}}

(F:/project/work/go/src/go-admin/models/sysuser.go:206)
[2020-05-17 07:00:02] [2.00ms] SELECT * FROM sys_user WHERE sys_user.deleted_at IS NULL AND ((sys_user.user_id = 1)) ORDER BY sys_user.user_id ASC LIMIT 1
[1 rows affected or returned ]
2020/05/17 07:00:02 Sysuser2: &{SysUserId:{UserId:1} SysUserB:{NickName:管理员3 Phone:13818888888 RoleId:1 Salt:
Avatar: Sex:0 Email:13818888888@qq.com DeptId:1 PostId:1 CreateBy:1 UpdateBy:1 Remark: Status:0 DataScope: Params:
BaseModel:{CreatedAt:2019-11-10 14:05:55 +0800 CST UpdatedAt:2020-05-16 21:10:09 +0800 CST DeletedAt:}} LoginM:{UserName:{Username:admin} PassWord:{Password:$2a$10$GxDu7R9zzpgft7xFjIEKxu0Sbe.7hYL0VEBMeg080g0idqYM1dj/e}}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant