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

用户登录时候,如果输入了不存在的用户名,后台报空指针异常 #272

Closed
linlinjie opened this issue Jul 4, 2022 · 3 comments · Fixed by #383
Closed
Assignees
Labels
in: hippo4j-server type: bug Something isn't working
Milestone

Comments

@linlinjie
Copy link
Contributor

Bug Report

你使用了哪个项目?Hippo-4J Server 还是 Hippo-4J Core?

Hippo-4J Server

你使用了哪个版本?

1.3.0

实际行为

后台报空指针异常

原因分析(如果可以)

cn.hippo4j.auth.service.impl.UserDetailsServiceImpl#loadUserByUsername 方法
userMapper获取用户信息,没有对用户信息判空

问题重现步骤

输入一个不存在的用户名即可重现

用于重现此问题的示例代码

https://github.com/mabaiwan/hippo4j/blob/develop/hippo4j-auth/src/main/java/cn/hippo4j/auth/service/impl/UserDetailsServiceImpl.java

@magestacks magestacks added the type: bug Something isn't working label Jul 4, 2022
@magestacks
Copy link
Member

@linlinjie 有兴趣帮忙尝试修复这个问题么

@magestacks magestacks added this to the 1.3.1 milestone Jul 4, 2022
@linlinjie
Copy link
Contributor Author

有啊,马兄莫急,我最近也比较忙,等待我提MR

@magestacks
Copy link
Member

ok,先分配给你,有时间了修复下就好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: hippo4j-server type: bug Something isn't working
Projects
None yet
2 participants