上传bug修改
This commit is contained in:
parent
ff4d31c0e2
commit
f69964d66d
@ -114,8 +114,8 @@ public class FileSecurityUtil {
|
|||||||
|
|
||||||
private boolean containsSuspiciousContent(MultipartFile file) throws IOException {
|
private boolean containsSuspiciousContent(MultipartFile file) throws IOException {
|
||||||
// 检查是否包含可执行文件特征(简单示例)
|
// 检查是否包含可执行文件特征(简单示例)
|
||||||
byte[] content = file.getBytes();
|
// byte[] content = file.getBytes();
|
||||||
String contentStr = new String(content).toLowerCase();
|
// String contentStr = new String(content).toLowerCase();
|
||||||
|
|
||||||
// return contentStr.contains("<?php") ||
|
// return contentStr.contains("<?php") ||
|
||||||
// contentStr.contains("<%") ||
|
// contentStr.contains("<%") ||
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user