精简压缩包解析的无用代码

精简压缩包解析的无用代码

Signed-off-by: 高雄 <admin@cxcp.com>
This commit is contained in:
高雄 2023-04-10 03:26:51 +00:00 committed by Gitee
parent f771d361ae
commit 888e550453
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 4 additions and 1 deletions

View File

@ -165,7 +165,10 @@ public class FileController {
fileUrl = WebUtils.decodeUrl(urls);
} catch (Exception ex) {
String errorMsg = String.format(BASE64_DECODE_ERROR_MSG, "url");
return errorMsg;
return ReturnResponse.failure(errorMsg);
}
if (KkFileUtils.isIllegalFileName(fileUrl)) {
return ReturnResponse.failure("不允许访问的路径:");
}
return RarUtils.getTree(fileUrl);
}