Repository navigation
fix: 修复动态鉴权管理器路径匹配优化问题 (Issue #884) - #934
Closed
Golenspade wants to merge 1 commit into
Closed
Golenspade wants to merge 1 commit into
Golenspade wants to merge 1 commit into
Conversation
- 修复 DynamicSecurityMetadataSource 中 context-path 处理问题 - 修复 DynamicSecurityFilter 中白名单路径匹配问题 - 添加 context-path 前缀移除逻辑,确保路径匹配正确 - 修复 Lombok 注解处理器问题,手动添加必要的 getter/setter 方法 - 添加完整的单元测试验证修复效果 修复内容: - DynamicSecurityMetadataSource.java: 添加 context-path 处理 - DynamicSecurityFilter.java: 添加 context-path 处理 - SwaggerProperties.java: 添加 getter/setter 方法 - WebLog.java: 添加 getter/setter 方法 - IgnoreUrlsConfig.java: 添加 getter/setter 方法 - PathMatchingTest.java: 添加测试用例 测试结果: 5/5 通过 ✅
|
您好,这里是孙鹏飞。
您发送的邮件已经收到。
|
|
你发过来的邮件怎么都是乱码啊,什么都看不到,再发一次吧。
|
|
这是来自QQ邮箱的假期自动回复邮件。
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
Author
|
Closing as this repository does not merge external PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题描述
修复 Issue #884: 动态鉴权管理器路径匹配优化
当应用配置了
server.servlet.context-path时,动态权限管理器的路径匹配会失败,导致无法正确查询到所需的权限。修复内容
核心修复
编译问题修复
测试验证
测试结果
✅ 所有 5 个测试用例全部通过
修复效果
修复后的代码能够正确处理以下场景:
/admin/users→ 正常匹配/admin/**/mall/admin/users→ 移除/mall前缀后匹配/admin/**向后兼容性
相关文件
mall-security/src/main/java/com/macro/mall/security/component/DynamicSecurityMetadataSource.javamall-security/src/main/java/com/macro/mall/security/component/DynamicSecurityFilter.javamall-security/src/test/java/com/macro/mall/security/component/PathMatchingTest.javamall-common/src/main/java/com/macro/mall/common/domain/SwaggerProperties.javamall-common/src/main/java/com/macro/mall/common/domain/WebLog.javamall-security/src/main/java/com/macro/mall/security/config/IgnoreUrlsConfig.java详细说明
请查看
SECURITY_FIX_SUMMARY.md文件获取完整的修复说明和测试详情。Closes #884