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

nacos server 2.3.0修改用户密码错误 #11595

Closed
stillOnTheWay opened this issue Jan 5, 2024 · 2 comments · Fixed by #11603
Closed

nacos server 2.3.0修改用户密码错误 #11595

stillOnTheWay opened this issue Jan 5, 2024 · 2 comments · Fixed by #11603

Comments

@stillOnTheWay
Copy link

stillOnTheWay commented Jan 5, 2024

验证2.3.0之前版本没问题 ,2.3.0版本 用nacos用户修改创建过的非nacos用户密码提示 authorization failed!

@stillOnTheWay
Copy link
Author

stillOnTheWay commented Jan 5, 2024

debug发现 com.alibaba.nacos.plugin.auth.impl.controller.UserController#hasPermission 方法内部执行
user = (NacosUser) identityContext.getParameter(AuthConstants.NACOS_USER_KEY) 得到nacos用户的globalAdmin属性是true
执行user = iAuthenticationManager.authenticate(request))后globalAdmin属性就变成了false 导致方法返回false nacos用户不能修改其他用户密码
截图地方的代码不应该用 || 判断吧, 或会导致 user = (NacosUser) identityContext.getParameter(AuthConstants.NACOS_USER_KEY) 的结果完全没有用 @KomachiSion
1704451324121
1704452124940

@godhth
Copy link
Contributor

godhth commented Jan 5, 2024

@i will solve it@

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

Successfully merging a pull request may close this issue.

3 participants