Skip to content

Commit

Permalink
Add terminating separator to avoid path escaping (#2288)
Browse files Browse the repository at this point in the history
  • Loading branch information
denysop committed Jul 28, 2022
1 parent 773f942 commit bd883b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static String readFileToString(String filePath) throws IOException {
}

private static String validateFileName(String fileName, File destinationFolder) throws IOException {
String destinationFolderCanonicalPath = destinationFolder.getCanonicalPath();
String destinationFolderCanonicalPath = destinationFolder.getCanonicalPath() + File.separator;

File file = new File(destinationFolderCanonicalPath, fileName);
String canonicalPath = file.getCanonicalPath();
Expand Down

0 comments on commit bd883b8

Please sign in to comment.