Skip to content

Commit

Permalink
Add terminating separator to avoid path escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
Denys Panchenko committed Jul 27, 2022
1 parent b598305 commit 866a513
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 866a513

Please sign in to comment.