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

严重权限漏洞 #14

Closed
dawnflyc opened this issue Feb 23, 2022 · 1 comment
Closed

严重权限漏洞 #14

dawnflyc opened this issue Feb 23, 2022 · 1 comment

Comments

@dawnflyc
Copy link

如果管理员修改了角色权限,然后该角色的用户仍在线的话,仍然有权限。
if (roleService.updateRole(role) > 0) { // 更新缓存用户权限 LoginUser loginUser = getLoginUser(); if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin()) { loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser())); loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName())); tokenService.setLoginUser(loginUser); } return AjaxResult.success(); }
这段代码可以看到,如果该用户不是管理员,则更新缓存。
问题是没有更新其他用户,只要该用户仍在线,就仍然拥有权限。
(大改若依时,测试权限模块发现)

@yangzongzhuan
Copy link
Owner

请在 https://gitee.com/y_project/RuoYi-Vue/issues 里提问,方便统一处理。

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

2 participants