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

getAnonTokenSession功能bug #748

Open
halosky opened this issue Mar 3, 2025 · 3 comments
Open

getAnonTokenSession功能bug #748

halosky opened this issue Mar 3, 2025 · 3 comments

Comments

@halosky
Copy link

halosky commented Mar 3, 2025

使用版本:

1.40.0

报错信息:

Cannot invoke "java.lang.Boolean.booleanValue()" because the return value of "cn.dev33.satoken.stp.SaLoginModel.getIsWriteHeader()" is null

希望结果:

希望能够未登录使用临时Session尤其是通过Redis的分布式Session 以便进行验证码等初始化数据校验存储工作.免去了再去通过做SpringBoot的 HttpSession集成Redis

复现步骤:

设置 config.setTokenSessionCheckLogin(false);
使用StpUtil.getAnonTokenSession();获取临时TokenSession ,在StpLogic类中第 171行函数中的SaLoginModel由于没有初始化IsWriteHeader,导致null调用报错,

< 备注:如果复现步骤比较复杂,请将 demo 上传到 gitee 并留下地址 >

@uncarbon97
Copy link
Contributor

1.40.0:

Image

1.39.0

Image

@uncarbon97
Copy link
Contributor

Image

@uncarbon97
Copy link
Contributor

已确认问题,下一版本修订

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