fix some codestyle problem

This commit is contained in:
陈精华
2023-05-06 16:51:06 +08:00
parent 9e3d450854
commit 93fb40d282
19 changed files with 97 additions and 96 deletions

View File

@@ -65,7 +65,7 @@ public class FileController {
return checkResult;
}
fileName = checkResult.getContent().toString();
if(!ConfigConstants.getpassword().equalsIgnoreCase(password)){
if(!ConfigConstants.getPassword().equalsIgnoreCase(password)) {
logger.error("删除文件【{}】失败,密码错误!",fileName);
return ReturnResponse.failure("删除文件失败,密码错误!");
}

View File

@@ -40,8 +40,8 @@ public class AttributeSetFilter implements Filter {
request.setAttribute("fileKey", httpRequest.getParameter("fileKey"));
request.setAttribute("switchDisabled", ConfigConstants.getOfficePreviewSwitchDisabled());
request.setAttribute("fileUploadDisable", ConfigConstants.getFileUploadDisable());
request.setAttribute("BeiAn", ConfigConstants.getBeiAn());
request.setAttribute("size", ConfigConstants.maxsize());
request.setAttribute("beiAn", ConfigConstants.getBeiAn());
request.setAttribute("size", ConfigConstants.maxSize());
}
/**

View File

@@ -56,7 +56,8 @@ public class TrustDirFilter implements Filter {
}
private boolean allowPreview(String urlPath) {
if(!StringUtils.hasText(urlPath) || !WebUtils.hefaurl(urlPath)){ //判断URL是否合法
//判断URL是否合法
if(!StringUtils.hasText(urlPath) || !WebUtils.isValidUrl(urlPath)) {
return false ;
}
try {