Skip to content

Commit 448e25d

Browse files
committed
yet more laundering
1 parent 008e5f3 commit 448e25d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/web/Laundromat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public static String launderRevision(String value) {
8080
* @return {@code null} if null or else {@code value} with path traversal
8181
* path components {@code /../} removed.
8282
*/
83-
public static String launderPath(String value) {
84-
Path path = Path.of(value);
83+
public static String launderPath(@NotNull String value) {
84+
Path path = Path.of(Laundromat.launderInput(value));
8585
List<String> pathElements = new ArrayList<>();
8686
for (int i = 0; i < path.getNameCount(); i++) {
8787
if (path.getName(i).toString().equals("..")) {

0 commit comments

Comments
 (0)