File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
opengrok-indexer/src/main/java/org/opengrok/indexer/web Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,12 @@ public static String launderRevision(String value) {
7373 /**
7474 * Sanitize {@code value} where it will be used in subsequent OpenGrok
7575 * (non-logging) processing. The value is assumed to represent a file path,
76- * not necessarily existent.
77- * @return {@code null} if null or else {@code value} with anything besides
78- * alphanumeric or {@code :} characters removed.
76+ * not necessarily existent on the file system .
77+ * @return {@code null} if null or else {@code value} with path traversal
78+ * path components {@code /../} removed.
7979 */
8080 public static String launderPath (String value ) {
81- return replaceAll (value , ESC_N_R_T_F , "" );
81+ return replaceAll (value , "/../" , "" );
8282 }
8383
8484 /**
You can’t perform that action at this time.
0 commit comments