Commit cfe1cf8f by 罗承锋

修改部分代码审计问题,提交审计结果

parent 6b2c737d
......@@ -523,9 +523,6 @@ public class LzKpiController extends BaseController {
if (!StringUtils.endsWithAny(file.getOriginalFilename(), "xlsx", "xls")) {
return ResponseData.error("手工上传数据仅支持Excel文件,其他格式不支持!");
}
if ( (double)file.getSize()/1048576 > 100) {
return ResponseData.error("文件过大,无法上传");
}
ShiroUser user = getShiroUser();
// 当前是否有数据权限
boolean hasDataPermission = user.getRoleNames().stream().anyMatch(data -> StringUtils.equalsAny(data, "活动上单员", "数据管理员", "超级管理员"));
......
......@@ -257,8 +257,8 @@ public class SchoolManagementController extends BaseController {
if ( (double)file.getSize()/1048576 > 100) {
return ResponseData.error("图片过大,无法上传");
}
File savePath = new File(backgroundpath, id + FILENAME);
School school1 = schoolMapper.selectById(id);
File savePath = new File(backgroundpath, school1.getId() + FILENAME);
OutputStream os = null;
try {
os = new FileOutputStream(savePath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment