# Apache Commons FileUpload Release Notes ## Release History
Version | Date | Description
--- | --- | ---
1.6.0 | 2025-06-05 | This release requires Java 8.
1.5 | 2023-02-13 | This release requires Java 6.
1.4 | 2018-12-23 | 1.4 Release
1.3.3 | 2017-06-13 | Bugfix release for 1.3.3
1.3.2 | 2016.05-26 | Bugfix release for 1.3.1
1.3.2 | 2014-02-07 | This is a security and maintenance release that includes an important security fix as well. Compared to 1.3.1, no other changes have been made.
1.3.1 | 2014-02-07 | This is a security and maintenance release that includes an important security fix as well as a small number of bugfixes.
1.3 | 2013-03-27 | maintenance release, JDK1.5 update
1.2.2 | 2010-07-29 |
1.2.1 | 2008-01-18 |
1.2 | 2007-02-13 |
1.1.1 | 2006-06-08 | Bugfix release
1.1 | 2005-12-24 | Portlet support, substantial refactoring and numerous bug fixes
1.0 | 2003-06-26 | Initial release
## Release 1.6.0 – 2025-06-05
Type | Changes | By
--- | --- | ---
| [1.x] Enable multipart/related on FileUpload #314. Thanks to mufasa1976, Jochen Wiedmann, Gary Gregory. | ggregory
| Add JApiCmp to the default Maven goal. Thanks to Gary Gregory. | ggregory
| Add partHeaderSizeMax, a new limit that sets a maximum number of bytes for each individual multipart header. The default is 512 bytes. Thanks to Mark Thomas. | markt
| Replace use of Locale.ENGLISH with Locale.ROOT. Thanks to Gary Gregory. | ggregory
| Remove unused exception from FileUploadBase.createItem(Map, boolean). Thanks to Gary Gregory. | ggregory
| Migrate from deprecated API in DiskFileItem.getOutputStream(). Thanks to Gary Gregory. | ggregory
| Use try-with-resources. Thanks to Gary Gregory. | ggregory
| Port to Java 1.4 Throwable APIs (!). Thanks to Gary Gregory. | ggregory
| Remove -nouses directive from maven-bundle-plugin. OSGi package imports now state 'uses' definitions for package imports, this doesn't affect JPMS (from org.apache.commons:commons-parent:80). Thanks to Gary Gregory. | ggregory
| DiskFileItem.getInputStream() now uses NIO. Thanks to Gary Gregory. | ggregory
| Last statement in DiskFileItem.finalize() method should be a call to super.finalize(). Thanks to Gary Gregory. | ggregory
| org.apache.commons.fileupload.FileUploadBase.FileUploadIOException is now a proper Java 1.4-style exception (propagates its cause to super). Thanks to Gary Gregory. | ggregory
| Use java.util.Base64 instead of custom code. Thanks to Gary Gregory. | ggregory
| Bump Java from 6 to 8. Thanks to Gary Gregory. | ggregory
| Bump org.apache.commons:commons-parent from 62 to 84, upgrades Doxia from 1 to 2. Thanks to Gary Gregory. | ggregory
| Bump commons-io from 2.11.0 to 2.19.0. Thanks to Gary Gregory. | ggregory
| Bump javax.servlet:servlet-api from 2.4 to 2.5. Thanks to Gary Gregory. | ggregory
| Bump JUnit from junit:junit:4.13.2 org.junit.vintage:junit-vintage-engine from parent POM. Thanks to Gary Gregory. | ggregory
## Release 1.5 – 2023-02-13
Type | Changes | By
--- | --- | ---
| Bump Commons IO to 2.11.0 | markt
| DiskFileItem.write(File) had been changed to use FileUtils.moveFile internally, preventing an existing file as the target. Fixes FILEUPLOAD-293. | jochen
| Improve parsing speed Thanks to David Georg Reichelt. | markt
| Switch from Cobertura code coverage to Jacoco code coverage. Fixes FILEUPLOAD-328. Thanks to Arturo Bernal. | markt
| Add a configurable limit (disabled by default) for the number of files to upload per request | markt
| Bump JUnit to 4.13.2 | markt
## Release 1.4 – 2018-12-23
Type | Changes | By
--- | --- | ---
| Don't create un-needed resources in FileUploadBase.java. Fixes FILEUPLOAD-292. | chtompki
| Upversion complier.source, compiler.target to 1.6. Fixes FILEUPLOAD-282. | chtompki
| DiskFileItem#write() could lose original IO exception. Fixes FILEUPLOAD-252. | tn
| DiskFileItem#getStoreLocation() wrongly returned a File object for items stored in memory. Fixes FILEUPLOAD-258. | tn
| FileUploadBase - should not silently catch and ignore all Throwables. Fixes FILEUPLOAD-242. | tn
| Fix Javadoc 1.8.0 errors. Fixes FILEUPLOAD-257. | tn
| Fix section "Resource cleanup" of the user guide. Fixes FILEUPLOAD-234. | tn
| Fix streaming example: use FileItem.getInputStream() instead of openStream(). Fixes FILEUPLOAD-237. | tn
| DiskFileItem might suppress critical IOExceptions on rename - use FileUtil.move instead. Fixes FILEUPLOAD-248. | ecki
| DiskFileItem#getTempFile() is broken. Fixes FILEUPLOAD-251. | sebb
| FileUploadBase - potential resource leak - InputStream not closed on exception. Fixes FILEUPLOAD-250. | sebb
| DiskFileItem.readObject fails to close FileInputStream. Fixes FILEUPLOAD-244. | sebb
| FileUpload should use IOUtils.closeQuietly where relevant. Fixes FILEUPLOAD-246. | sebb
| DiskFileItem.get() may not fully read the data. Fixes FILEUPLOAD-245. | sebb
| Make some MultipartStream private fields final. Fixes FILEUPLOAD-243. Thanks to Ville Skyttä. | sebb
| Site: added security report | ecki
| Improve performance for large multi-part boundaries Thanks to Felix Schumacher. | markt
| Added the default character set to the DiskFileItem. Fixes FILEUPLOAD-286. Thanks to maxxedev. | jochen
| Avoid using File.exists() on temporary files, if we know that the file has been created. Fixes FILEUPLOAD-288. Thanks to fangwentong. | jochen
| Added .travis.yml, to fix build issues on Github. Thanks to Pascal Schumacher. | jochen
## Release 1.3.3 – 2017-06-13
Type | Changes | By
--- | --- | ---
| DiskDileItem can actually no longer be deserialized, unless a system property is set to true. Fixes FILEUPLOAD-279. | jochen
## Release 1.3.2 – 2016.05-26
Type | Changes | By
--- | --- | ---
| SECURITY - CVE-2016-3092. Performance Improvement in MultipartStream. Fixes FILEUPLOAD-272. | jochen
## Release 1.3.2 – 2014-02-07
Type | Changes | By
--- | --- | ---
| SECURITY - CVE-2016-3092. Specially crafted input can trigger a DoS, if the size of the MIME boundard is close to the size of the buffer in MultipartStream. (Similar to CVE-2014-0050.) | jochen
## Release 1.3.1 – 2014-02-07
Type | Changes | By
--- | --- | ---
| SECURITY - CVE-2014-0050. Specially crafted input can trigger a DoS if the buffer used by the MultipartStream is not big enough. When constructing MultipartStream enforce the requirements for buffer size by throwing an IllegalArgumentException if the requested buffer size is too small. This prevents the DoS. | markt
| When deserializing DiskFileItems ensure that the repository location, if any, is a valid one. Thanks to Arun Babu Neelicattu. | markt
| Correct example in usage documentation so it compiles. | markt
## Release 1.3 – 2013-03-27
Type | Changes | By
--- | --- | ---
| SECURITY - CVE-2013-0248. Update the Javadoc and documentation to make it clear that setting a repository is required for a secure configuration if there are local, untrusted users. | markt
| Update the project tree dirs according to default Maven conventions. Fixes FILEUPLOAD-216. | simonetripodi
| drop JDK1.3 support and update to Java5. Fixes FILEUPLOAD-217. | simonetripodi
| Update version in POM. Fixes FILEUPLOAD-218. | simonetripodi
| upgrade tests to JUnit 4. Fixes FILEUPLOAD-219. | simonetripodi
| replace package.html with package-info.java. Fixes FILEUPLOAD-220. | simonetripodi
| FileItemHeadersImpl can now use LinkedHashMap. Fixes FILEUPLOAD-221. | simonetripodi
| Mark @deprecated classes/methods with @Deprecated annotation. Fixes FILEUPLOAD-222. | simonetripodi
| Base64Decoder doesn't correctly implement RFC 4648. Fixes FILEUPLOAD-233. Thanks to Simone Tripodi. | sebb
| "Stream ended unexpectedly" when posting from a Flash client. Fixes FILEUPLOAD-143. Thanks to Luke Scott. | jochen
| Manifest for OSGi has invalid syntax. Fixes FILEUPLOAD-173. Thanks to Bjorn Harvold. | simonetripodi
| commons-io dependency does not get loaded by maven if only dependency to commons-fileupload is specified. Fixes FILEUPLOAD-183. Thanks to Roman Arkadijovych Muntyanu. | simonetripodi
| http://commons.apache.org/fileupload/index.html is out of date. Fixes FILEUPLOAD-185. Thanks to Sebb. | simonetripodi
| http://commons.apache.org/fileupload/index.html should not mention nightly builds. Fixes FILEUPLOAD-186. Thanks to Sebb. | simonetripodi
| DiskFileItemFactory use of FileCleaningTracker is documented or coded wrong - proposal submitted by Jan Novotný. Fixes FILEUPLOAD-189. Thanks to Gregor K. | simonetripodi
| Error reading the file size larger than 2 gb - pull request from Gergely. Fixes FILEUPLOAD-195. Thanks to Juliano Alves. | simonetripodi
| ServletFileUpload isMultipartContent method does not support HTTP PUT - thanks Roy T. Fielding and Jochen Wiedmann. Fixes FILEUPLOAD-197. Thanks to David Wolverton. | simonetripodi
| Uploads have unexpected results for files with non-ASCII names - support RFC2047 - thanks Thomas Neidhart. Fixes FILEUPLOAD-199. Thanks to Mark Thomas. | simonetripodi
| Exceptions resulting from upload size limitations (fileSizeMax, sizeMax) are now correctly propagated to the caller (these could be encountered formerly as MalformedStreamException: "Stream ended unexpectedly"). Fixes FILEUPLOAD-202. Thanks to tina. | tn
| FileItem.getHeaders() returns always null. Fixes FILEUPLOAD-204. Thanks to Hakju Oh. | jochen
| The sizeMax parameter within FileUpload is now correctly enforced if no content length header is provided. Fixes FILEUPLOAD-212. Thanks to Damian Kolasa. | tn
| ServletFileUpload only accepts POST requests. Fixes FILEUPLOAD-214. Thanks to Matthew Runo. | simonetripodi
| (Servlet|Portlet)RequestContext#contentLength() must return request.getContentLength() if Content-length header is not available. Fixes FILEUPLOAD-228. Thanks to Thomas Neidhart. | simonetripodi
| toLowerCase() is Locale-dependent; should use toLowerCase(Locale.ENGLISH) instead. Fixes FILEUPLOAD-229. Thanks to seb. | simonetripodi
| There are no unit tests for the new utils.mime classes. Fixes FILEUPLOAD-229. Thanks to seb. | sebb,simonetripodi
| Documentation: add simple HTML form example to fileupload user guide. Fixes FILEUPLOAD-182. Thanks to Chris Lott. | simonetripodi
| enhance file read/write performance - patch provided by frank. Fixes FILEUPLOAD-207. Thanks to frank. | simonetripodi
| Add Support for Generic Types. Fixes FILEUPLOAD-209. Thanks to Fernando Ribeiro. | simonetripodi
| Process HTTP Requests Into Maps. Fixes FILEUPLOAD-210. Thanks to Fernando Ribeiro. | simonetripodi
| Update commons-io dependency to latest version that supports JDK1.5. Fixes FILEUPLOAD-223. | simonetripodi
| Avoid string concatenations while parsing headers, use buffers instead. Fixes FILEUPLOAD-224. | simonetripodi
| Replace java.rmi.server.UID() with java.util.UUID. Fixes FILEUPLOAD-225. | simonetripodi
| DiskFileItem.counter could be converted to AtomicInteger (or AtomicLong?). Fixes FILEUPLOAD-226. | sebb
| Private immutable fields which could be final. Fixes FILEUPLOAD-227. | sebb
| Update to JDK 1.5 and bump IO dependency to 2.0.1. Fixes FILEUPLOAD-201. | simonetripodi
| version 1.3 improvement tasks. Fixes FILEUPLOAD-215. | simonetripodi
## Release 1.2.2 – 2010-07-29
Type | Changes | By
--- | --- | ---
| Added a check for file names containing a NULL characters. Such file names are now triggering an InvalidFileNameException since the file name cannot be used as provided to create the file since it will be truncated at the NUL character on most (all?) operating systems. E.g. a file name like "test.foo0.bar" would result in "test.foo" being created. Thanks to Daniel Fabian. | jochen
| Temporary files have not been deleted, if an error occurred in FileUploadBase.parseRequest();. Fixes FILEUPLOAD-160. Thanks to Stepan Koltsov. | jochen
| Fixed example in MultipartStream Javadocs. Fixes FILEUPLOAD-158. Thanks to Stepan Koltsov. | jochen
| Ensured, that the ProgressListener is called for all items. Fixes FILEUPLOAD-157. Thanks to Paul Spurr. | jochen
| Made the ProgressNotifier public. Fixes FILEUPLOAD-156. | jochen
| Multiple documentation fixes. Fixes FILEUPLOAD-155. Thanks to Jörg Heinicke. | jochen
| Fixed the error message for FileSizeLimitExceededException from "too many characters" to "too many bytes". Fixes FILEUPLOAD-152. Thanks to Duzakropka. | jochen
| A FileSizeLimitExceededException does now contain the file and field name of the item, which caused the problem. Fixes FILEUPLOAD-154. | jochen
| The FileItemHeader stuff hasn't been actually working. Fixes FILEUPLOAD-130. Thanks to Guillaume Cottenceau. | jochen
## Release 1.2.1 – 2008-01-18
Type | Changes | By
--- | --- | ---
| Upgrade to commons-io-1.4-SNAPSHOT, in order to use the new FileCleaningTracker and fix issues with FileCleaner. | jochen
| Made the MockHttpServletRequest comply to the servlet 2.4 specification by applying http://www.sourcelabs.com/dashboards/sash-1.2/patches/commons-fileupload-1.1-1/SUP-520.diff. Fixes FILEUPLOAD-129. | jochen
| Added support for accessing the file item headers. Fixes FILEUPLOAD-130. Thanks to Michael Macaluso. | jochen
| A MalformedStreamException is now thrown, if the size of an items headers exceeds HEADER_PART_SIZE_MAX;. Fixes FILEUPLOAD-116. Thanks to Amichai Rothman. | jochen
| DiskFileItem.toString() could throw an NPE. Fixes FILEUPLOAD-134. Thanks to Thomas Vandahl. | jochen
| Short files could cause an unexpected end of the item stream. Fixes FILEUPLOAD-135. Thanks to Alexander Sova. | jochen
| A FileSizeLimitExceededException was deferred until the complete file has been uploaded. Additionally, the FileSizeLimitException is now thrown immediately, if the attachments headers contain a content-length value, which exceeds the configured limit. Fixes FILEUPLOAD-145. | jochen
| Fixed a classpath problem when building with Sun JDK 1.3.1 and Ant. Fixes FILEUPLOAD-153. Thanks to Gary Gregory. | jochen
## Release 1.2 – 2007-02-13
Type | Changes | By
--- | --- | ---
| Made Streams.asString static. Thanks to Aaron Freeman. | jochen
| Eliminated duplicate code. Fixes FILEUPLOAD-109. | jochen
| Added a streaming API. Fixes FILEUPLOAD-112. | jochen
| Eliminated the necessity of a content-length header. Fixes FILEUPLOAD-93. | jochen
| Eliminated the limitation of a maximum size for a single header line. (The total size of all headers is already limited, so there's no need for another limit.). Fixes FILEUPLOAD-108. Thanks to Amichai Rothman. | jochen
| Added the ProgressListener, which allows to implement a progress bar. Fixes FILEUPLOAD-87. | jochen
| Added support for header continuation lines. Fixes FILEUPLOAD-111. Thanks to Amichai Rothman. | jochen
| It is now possible to limit the actual file size and not the request size. Fixes FILEUPLOAD-88. Thanks to Andrey Aristarkhov. | jochen
| Added the FileCleanerCleanup as an example for how to close down the FileCleaner's reaper thread nicely. Fixes FILEUPLOAD-120. Thanks to Henry Yandell. | jochen
| A descriptive NPE is now thrown, if the FileItemFactory has not been set. Fixes FILEUPLOAD-123. | jochen
## Release 1.1.1 – 2006-06-08
Type | Changes | By
--- | --- | ---
| Cache disk file item size when it is moved to a new location. Fixes FILEUPLOAD-20. | martinc
| File names were being inadvertently converted to lower case. Fixes FILEUPLOAD-30. | martinc
## Release 1.1 – 2005-12-24
Type | Changes | By
--- | --- | ---
| Updates for FileUpload 1.1-RC1. | martinc
| Added release notes for FileUpload 1.1. | martinc
| Update the User Guide to document the "right" way of using FileUpload 1.1, rather than the older, and thus deprecated, ways that are compatible with FileUpload 1.0. | martinc
| Add this change log, including all changes since the Commons FileUpload 1.0 release. | martinc
| Update Commons IO dependency to version 1.1. | martinc
| Add custom PMD configuration. | martinc
| Make inner exception classes static, which they should have been all along. | martinc
| Fix Checkstyle warnings. | martinc
| Remove Javadoc warnings. Fixes FILEUPLOAD-29. Thanks to Rahul Akolkar. | martinc
| Build updates: Include NOTICE.txt in the jar file and distributions. | martinc
| Build updates: Include xdocs in source distribution. | martinc
| Build updates: Create MD5 checksums for distributions. | martinc
| Add custom Checkstyle configuration. | martinc
| Update dependencies in POM, and add comments and scope. | martinc
| Standardise on @throws instead of having a mixture of that and @exception. | martinc
| Make DiskFileItem serializable. Thanks to Niall Pemberton for the suggestion and patch. Fixes FILEUPLOAD-50. Thanks to Niall Pemberton. | martinc
| Make the temporary file names unique across class loaders, not just within them, by including a UID in the file name. | martinc
| Include the actual and permitted sizes in both the exception message and the exception itself. Fixes FILEUPLOAD-77. | martinc
| If an explicit header encoding is not specified, use the one from the appropriate context (i.e. ServletRequest or ActionRequest). Fixes FILEUPLOAD-13. | martinc
| Add getCharacterEncoding to the request context. | martinc
| Null check and case insensitivity fixes. Fixes FILEUPLOAD-83. | martinc
| Web site updates: Add detail pages for Source Repository and Issue Tracking, based on those for IO and Validator. Improvements to FileUpload home page, based on similar recent changes to IO and Validator home pages. The Bugzilla component name has a space in it. Fix the URLs. Add an FAQ page, using the Maven plugin to generate it. | martinc
| Fixes to POMs. Fixes COMMONSSITE-2. | dion
| Setting source and target for Java 1.3 | mrdon
| Fix typos in Javadoc code examples. Fixes FILEUPLOAD-37. | martinc
| Fix typos in exception messages. | martinc
| Obtain request content type from container instead of headers. Fixes FILEUPLOAD-5. | martinc
| New mock objects from Jetspeed-2, and new FileUpload test cases. | sullis
| added toString() methods | sullis
| Fix up the existing package.html file and add new ones for the newly introduced packages. Fairly minimal, but with a link to the user guide. | martinc
| Substantial refactoring and additions: The core package is now independent of servlet / portlet / other distinctions, as well as persistence schemes, other than deprecated classes and methods retained for backwards compatibility. Servlet specific functionality has been moved to a new 'servlet' package. Existing users should migrate to this as soon as possible, since the servlet specific functionality in the generic package will be removed in the release after FileUpload 1.1. Support for portlets (JSR 168) has been added, in a new 'portlet' package. This is not well tested at this point, and feedback would be very much appreciated. (This also resolves bug #23620.) The disk-based file item implementation has been moved into a 'disk' package, and renamed from Default* to Disk* to reflect what it really is. The Default* classes have been retained in the top level package for backwards compatibility, but are now deprecated, and will be removed in the release after FileUpload 1.1. The isMultipartRequest method is an unfortunate casualty of this refactoring. That method should really be moved to ServletFileUpload, but since the method is static, it can only exist in either FileUploadBase or ServletFileUpload. Backwards compatibility dictates the former for now, but the latter is the desired state, which implies some future breakage. Fair warning... | martinc
| Specify the encoding (ISO-8859-1) when converting the boundary to a byte array. Fixes FILEUPLOAD-4. | martinc
| Convert to Sun coding guidelines. | martinc
| DeferredFileOutputStream moved to Commons IO. | martinc
| Workaround for Mac IE5 bug. Thanks to Justin Sampson for the patch and tests for this vexing issue. Fixes FILEUPLOAD-16. Thanks to Justin Sampson. | martinc
| Handle unquoted header parameters. Fixes FILEUPLOAD-104. | martinc
| Some documentation on interaction with virus scanners. Fixes FILEUPLOAD-78. | martinc
| More unit tests from Justin Sampson. Fixes FILEUPLOAD-31. Thanks to Justin Sampson. | martinc
| Use FileCleaner from Commons IO to clean up temp files, rather than File.deleteOnExit(), which can cause serious problems in long-running processes. Fixes FILEUPLOAD-95. | martinc
| Check that HTTP method is POST as part of multipart check. Fixes FILEUPLOAD-53. | martinc
| Switch to Commons IO version of DeferredFileOutputStream. Adding IO as a dependency will allow us to take advantage of other classes in that component to fix additional FileUpload bugs. | martinc
| handle quoted boundary specification. Fixes FILEUPLOAD-40. | martinc
| use case-independent comparisons for encoding types. Fixes FILEUPLOAD-18. | martinc
| Fix comments to avoid break iterator complaints. | martinc
| Fix typos in comments. Thanks to Yuji Yamano. | martinc
| Add support for character sets specified for individual parts. Fixes FILEUPLOAD-101. Thanks to Oleg Kalnichevski. | martinc
| Change to Apache License 2.0 | scolebourne
| Correct the comment for the no-args constructor to reflect the fact that a factory needs to be set before parsing uploads. Fixes FILEUPLOAD-22. | martinc
| Collapse some all but duplicated code. | martinc
| Fix example showing FileItem.write to use a File object. Fixes FILEUPLOAD-72. | jmcnally
| Check for null before attempting to close streams in write(). Fixes FILEUPLOAD-21. Thanks to Peter Chase. | martinc
| Correction to sample code in the docs. Fixes FILEUPLOAD-67. Thanks to Paul Dalton. | martinc
## Release 1.0 – 2003-06-26 No changes in this release.