JacobDale-CN

Results 1 issues of JacobDale-CN

在mall-security模块中的SecurityConfig对dynamicSecurityFilter的配置可能导致二次鉴权,主要原因可能是在该模块下的DynamicSecurityFilter进行配置时忽略了FILTER_APPLY的配置(参考FilterSecurityInterceptor类的实现),并且在SecurityConfig中重复使用了ExpressionUrlAuthorizationConfigurer配置白名单和OPTIONS请求,使得鉴权过滤器被重复配置两次,该配置问题同时导致了 https://github.com/macrozheng/mall/issues/587 我的解决方案是直接让DynamicSecurityFilter继承FilterSecurityInterceptor类 ![image](https://github.com/macrozheng/mall/assets/75790681/d38a0c14-a1b9-46ff-92b6-cb201b2e6cd6) ![image](https://github.com/macrozheng/mall/assets/75790681/6833ca49-771e-4bd8-be05-3a939e735026) ![image](https://github.com/macrozheng/mall/assets/75790681/c3b7b352-90de-4df4-805f-24736a9499d6) 然后把SecurityConfig中的addFilterBefore改成addFilterAt 简单测试了一下好像是没什么问题(因为是萌新所以就是简单测了一下,也没有过一遍完整测试流程),并且在 https://github.com/macrozheng/mall/issues/587 提到的日志重复问题也没有发生,如果大佬有时间的话希望能够看看这个有没有什么问题