You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/eu/righettod/SecurityUtils.java
+12-18Lines changed: 12 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -1157,10 +1157,8 @@ public static String applyURLDecoding(String encodedData, int decodingRoundThres
1157
1157
* Apply a collection of validations on a string expected to be an system file/folder path:
1158
1158
* <ul>
1159
1159
* <li>Does not contains path traversal payload.</li>
1160
+
* <li>The canonical path is equals to the absolute path.</li>
1160
1161
* </ul><br>
1161
-
* <p>
1162
-
* <b>Note:</b> This implementation is sensitive to the current folder expression <code>./</code> and <code>.\</code> - Therefore <b>it will consider the path as unsafe</b> when it contains such expression.
1163
-
* </p>
1164
1162
*
1165
1163
* @param path String expected to be a valid system file/folder path.
1166
1164
* @return True only if the string pass all validations.
@@ -1176,22 +1174,18 @@ public static boolean isPathSafe(String path) {
1176
1174
if (path != null && !path.isEmpty()) {
1177
1175
//URL decode the path if case of data coming from a web context
0 commit comments