This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-fileupload.git
The following commit(s) were added to refs/heads/master by this push: new 7a1d90ed Javadoc: Use semantic tag <strong> instead of style tag <b> 7a1d90ed is described below commit 7a1d90ed150fbd86ea24d88dd52d2408b701eab0 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Nov 15 11:21:35 2024 -0500 Javadoc: Use semantic tag <strong> instead of style tag <b> --- .../java/org/apache/commons/fileupload2/core/DiskFileItem.java | 4 ++-- .../apache/commons/fileupload2/core/DiskFileItemFactory.java | 10 +++++----- .../java/org/apache/commons/fileupload2/core/RFC2231Utils.java | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/DiskFileItem.java b/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/DiskFileItem.java index bb82efb4..d7e6a358 100644 --- a/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/DiskFileItem.java +++ b/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/DiskFileItem.java @@ -438,7 +438,7 @@ public final class DiskFileItem implements FileItem<DiskFileItem> { /** * Gets the contents of the file as a String, using the default character encoding. This method uses {@link #get()} to retrieve the contents of the file. * <p> - * <b>TODO</b> Consider making this method throw UnsupportedEncodingException. + * <strong>TODO</strong> Consider making this method throw UnsupportedEncodingException. * </p> * * @return The contents of the file, as a string. @@ -463,7 +463,7 @@ public final class DiskFileItem implements FileItem<DiskFileItem> { * Creates and returns a {@link java.io.File File} representing a uniquely named temporary file in the configured repository path. The lifetime of the file * is tied to the lifetime of the {@code FileItem} instance; the file will be deleted when the instance is garbage collected. * <p> - * <b>Note: Subclasses that override this method must ensure that they return the same File each time.</b> + * <strong>Note: Subclasses that override this method must ensure that they return the same File each time.</strong> * </p> * * @return The {@link java.io.File File} to be used for temporary storage. diff --git a/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/DiskFileItemFactory.java b/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/DiskFileItemFactory.java index 2bc6392c..baff71d5 100644 --- a/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/DiskFileItemFactory.java +++ b/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/DiskFileItemFactory.java @@ -38,11 +38,11 @@ import org.apache.commons.io.file.PathUtils; * <li>Repository is the system default temporary directory, as returned by {@code System.getProperty("java.io.tmpdir")}.</li> * </ul> * <p> - * <b>NOTE</b>: Files are created in the system default temporary directory with predictable names. This means that a local attacker with write access to that - * directory can perform a TOUTOC attack to replace any uploaded file with a file of the attackers choice. The implications of this will depend on how the - * uploaded file is used but could be significant. When using this implementation in an environment with local, untrusted users, {@link Builder#setPath(Path)} - * MUST be used to configure a repository location that is not publicly writable. In a Servlet container the location identified by the ServletContext attribute - * {@code javax.servlet.context.tempdir} may be used. + * <strong>NOTE</strong>: Files are created in the system default temporary directory with predictable names. This means that a local attacker with write access + * to that directory can perform a TOUTOC attack to replace any uploaded file with a file of the attackers choice. The implications of this will depend on how + * the uploaded file is used but could be significant. When using this implementation in an environment with local, untrusted users, + * {@link Builder#setPath(Path)} MUST be used to configure a repository location that is not publicly writable. In a Servlet container the location identified + * by the ServletContext attribute {@code javax.servlet.context.tempdir} may be used. * </p> * <p> * Temporary files, which are created for file items, should be deleted later on. The best way to do this is using a {@link FileCleaningTracker}, which you can diff --git a/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/RFC2231Utils.java b/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/RFC2231Utils.java index 3924f140..d9b741ac 100644 --- a/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/RFC2231Utils.java +++ b/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/RFC2231Utils.java @@ -60,11 +60,11 @@ final class RFC2231Utils { /** * Decodes a string of text obtained from a HTTP header as per RFC 2231 * - * <b>Eg 1.</b> {@code us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A} will be decoded to {@code This is ***fun***} + * <strong>Eg 1.</strong> {@code us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A} will be decoded to {@code This is ***fun***} * - * <b>Eg 2.</b> {@code iso-8859-1'en'%A3%20rate} will be decoded to {@code £ rate}. + * <strong>Eg 2.</strong> {@code iso-8859-1'en'%A3%20rate} will be decoded to {@code £ rate}. * - * <b>Eg 3.</b> {@code UTF-8''%c2%a3%20and%20%e2%82%ac%20rates} will be decoded to {@code £ and € rates}. + * <strong>Eg 3.</strong> {@code UTF-8''%c2%a3%20and%20%e2%82%ac%20rates} will be decoded to {@code £ and € rates}. * * @param encodedText Text to be decoded has a format of {@code <charset>'<language>'<encoded_value>} and ASCII only * @return Decoded text based on charset encoding