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 11/*
2- * Copyright 2002-2018 the original author or authors.
2+ * Copyright 2002-2021 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -33,6 +33,14 @@ public interface FilePart extends Part {
3333
3434 /**
3535 * 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>
3644 */
3745 String filename ();
3846
Original file line number Diff line number Diff line change @@ -55,13 +55,13 @@ public interface MultipartFile extends InputStreamSource {
5555 * but it typically will not with any other than Opera.
5656 * <p><strong>Note:</strong> Please keep in mind this filename is supplied
5757 * 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
5959 * as ".." and others that can be used maliciously.
6060 * @return the original filename, or the empty String if no file has been chosen
6161 * in the multipart form, or {@code null} if not defined or not available
6262 * @see org.apache.commons.fileupload.FileItem#getName()
6363 * @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>
6565 * @see <a href="https://owasp.org/www-community/vulnerabilities/Unrestricted_File_Upload">Unrestricted File Upload</a>
6666 */
6767 @ Nullable
You can’t perform that action at this time.
0 commit comments