xiaozhi-esp32-server/main/manager-api
kumburovicbranko682-boop 61675f423b fix(security): authentication bypass via non-null default userdetail on auth failure
When `getSubject()` returns null (e.g., no Shiro session, expired token, or exception) or when `getPrincipal()` is null, the method returns `new UserDetail()` instead of null. This means callers performing null-check guards (e.g., `if (SecurityUser.getUser() != null)`) will believe an authenticated user exists when none does. Additionally, `getSubject()` silently swallows all exceptions and returns null, masking authentication infrastructure failures. Any downstream code relying on a null return to deny access will be bypassed with a default UserDetail object.


Affected files: SecurityUser.java

Signed-off-by: kumburovicbranko682-boop <295886834+kumburovicbranko682-boop@users.noreply.github.com>
2026-06-27 19:38:43 +08:00
..
src fix(security): authentication bypass via non-null default userdetail on auth failure 2026-06-27 19:38:43 +08:00
pom.xml update:添加SM2国密加密的登录接口 2025-09-23 09:58:27 +08:00
README.md 更新全模块部署文档 (#753) 2025-04-13 00:21:13 +08:00

本文档是开发类文档,如需部署小智服务端,点击这里查看部署教程

项目介绍

manager-api 该项目基于SpringBoot框架开发。

开发使用代码编辑器,导入项目时,选择manager-api文件夹作为项目目录

开发环境

JDK 21 Maven 3.8+ MySQL 8.0+ Redis 5.0+ Vue 3.x

接口文档

启动后打开:http://localhost:8002/xiaozhi/doc.html