File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
spring-web/src/main/java/org/springframework Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2021 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -33,6 +33,14 @@ public interface FilePart extends Part {
33
33
34
34
/**
35
35
* Return the original filename in the client's filesystem.
36
+ * <p><strong>Note:</strong> Please keep in mind this filename is supplied
37
+ * by the client and should not be used blindly. In addition to not using
38
+ * the directory portion, the file name could also contain characters such
39
+ * as ".." and others that can be used maliciously.
40
+ * @return the original filename, or the empty String if no file has been chosen
41
+ * in the multipart form, or {@code null} if not defined or not available
42
+ * @see <a href="https://tools.ietf.org/html/rfc7578#section-4.2">RFC 7578, Section 4.2</a>
43
+ * @see <a href="https://owasp.org/www-community/vulnerabilities/Unrestricted_File_Upload">Unrestricted File Upload</a>
36
44
*/
37
45
String filename ();
38
46
Original file line number Diff line number Diff line change @@ -55,13 +55,13 @@ public interface MultipartFile extends InputStreamSource {
55
55
* but it typically will not with any other than Opera.
56
56
* <p><strong>Note:</strong> Please keep in mind this filename is supplied
57
57
* by the client and should not be used blindly. In addition to not using
58
- * the directory portion, the file name could also contain characters * such
58
+ * the directory portion, the file name could also contain characters such
59
59
* as ".." and others that can be used maliciously.
60
60
* @return the original filename, or the empty String if no file has been chosen
61
61
* in the multipart form, or {@code null} if not defined or not available
62
62
* @see org.apache.commons.fileupload.FileItem#getName()
63
63
* @see org.springframework.web.multipart.commons.CommonsMultipartFile#setPreserveFilename
64
- * @see <a href="https://tools.ietf.org/html/rfc7578#section-4.2">RFC 7578, Section 3.4 </a>
64
+ * @see <a href="https://tools.ietf.org/html/rfc7578#section-4.2">RFC 7578, Section 4.2 </a>
65
65
* @see <a href="https://owasp.org/www-community/vulnerabilities/Unrestricted_File_Upload">Unrestricted File Upload</a>
66
66
*/
67
67
@ Nullable
You can’t perform that action at this time.
0 commit comments