-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct device information update during account switch (#6483)
#### What type of PR is this? /kind bug /area core /milestone 2.19.x #### What this PR does / why we need it: 修复切换账号登录时设备信息更新不正确的问题 原因: 1. 使用 admin 账号登录,此时会记录 device_id 的 cookie 2. 退出登录,device_id 会保留在 cookie 中并随着新账号带到服务端 3. 服务端根据 device_id 查询当前设备是否有对应的记录,但是没有校验用户名是否与当前登陆的一致然后就去更新登录时间 4. 正确的处理是校验 device_id 是否有与之对应的记录并且用户名相同,如果不相同则认为是新设备重新生成 device_id **how to test it?** 1. 先清理 cookie 然后使用一个账号登录 2. 退出登陆并切换新账号登录 3. 检查新登录的账号的设备信息是否正确 #### Does this PR introduce a user-facing change? ```release-note 修复切换账号登录时设备信息更新不正确的问题 ```
- Loading branch information
Showing
1 changed file
with
34 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters