修复路由拦截鉴权可被绕过的问题 fix #515

This commit is contained in:
click33
2023-10-16 16:02:19 +08:00
parent f2416a6175
commit 954efeb732
33 changed files with 688 additions and 79 deletions

View File

@@ -16,6 +16,7 @@
package cn.dev33.satoken.servlet.model;
import cn.dev33.satoken.SaManager;
import cn.dev33.satoken.application.ApplicationInfo;
import cn.dev33.satoken.context.model.SaRequest;
import cn.dev33.satoken.exception.SaTokenException;
import cn.dev33.satoken.servlet.error.SaServletErrorCode;
@@ -124,7 +125,7 @@ public class SaRequestForServlet implements SaRequest {
*/
@Override
public String getRequestPath() {
return request.getServletPath();
return ApplicationInfo.cutPathPrefix(request.getRequestURI());
}
/**