We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4953d4d commit 9d067efCopy full SHA for 9d067ef
1 file changed
java-web/java文件漏洞检查.md
@@ -0,0 +1,23 @@
1
+在IDEA中的项目中重点搜下如下文件读取的类。
2
+
3
+JDK原始的java.io.FileInputStream、java.io.FileInputStream类;
4
+JDK原始的java.io.RandomAccessFile类;
5
+Apache Commons IO提供的org.apache.commons.io.FileUtils类;
6
+JDK1.7新增的基于NIO非阻塞异步读取文件的java.nio.channels.AsynchronousFileChannel类;
7
+JDK1.7新增的基于NIO读取文件的java.nio.file.Files类。常用方法如:Files.readAllBytes、Files.readAllLines;
8
+java.io.File类的list、listFiles、listRoots、delete方法;
9
+除此之外,还可以搜索一下FileUtil/FileUtils很有可能用户会封装文件操作的工具类。
10
11
+java.io.FileInputStream
12
13
14
+org.apache.commons.io.FileUtils
15
+java.nio.channels.AsynchronousFileChannel
16
+java.nio.file.Files
17
+Files.readAllBytes
18
+Files.readAllLines
19
+list
20
+listFiles
21
+listRoots
22
+delete
23
+FileUtil/FileUtils
0 commit comments