From 7bd94085196b9c374caac071401278bc6d12675e Mon Sep 17 00:00:00 2001 From: guqing <38999863+guqing@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:39:06 +0800 Subject: [PATCH] chore: standardize request parsing to use a single path handler (#7106) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement /area core /milestone 2.20.x #### What this PR does / why we need it: 统一使用同一个 RequestPath 来解析请求信息 #### Does this PR introduce a user-facing change? ```release-note None ``` --- .../run/halo/app/security/authorization/RequestInfoFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/java/run/halo/app/security/authorization/RequestInfoFactory.java b/application/src/main/java/run/halo/app/security/authorization/RequestInfoFactory.java index b908c9e8e9..54e4112f68 100644 --- a/application/src/main/java/run/halo/app/security/authorization/RequestInfoFactory.java +++ b/application/src/main/java/run/halo/app/security/authorization/RequestInfoFactory.java @@ -94,7 +94,7 @@ public RequestInfo newRequestInfo(ServerHttpRequest request) { RequestInfo requestInfo = new RequestInfo(false, path.value(), request.getMethod().name().toLowerCase()); - String[] currentParts = splitPath(request.getPath().value()); + String[] currentParts = splitPath(path.value()); if (currentParts.length < 3) { // return a non-resource request