Add Javadoc note explaining that StringUtils.cleanPath should not be
depended on in security context.
This commit is contained in:
Arjen Poutsma 2020-07-23 17:43:20 +02:00
parent 05683fed7a
commit cf8c36adf3
1 changed files with 3 additions and 0 deletions

View File

@ -645,6 +645,9 @@ public abstract class StringUtils {
* inner simple dots.
* <p>The result is convenient for path comparison. For other uses,
* notice that Windows separators ("\") are replaced by simple slashes.
* <p><strong>NOTE</strong> that {@code cleanPath} should not be depended
* upon in a security context. Other mechanisms should be used to prevent
* path-traversal issues.
* @param path the original path
* @return the normalized path
*/