mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-15 13:43:46 +08:00
fix some codestyle problem
This commit is contained in:
@@ -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("删除文件失败,密码错误!");
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user