Skip to content
Permalink
Browse files Browse the repository at this point in the history
Don't allow filepaths as Filename when requesting source files
  • Loading branch information
Beechwell committed Jul 22, 2020
1 parent 8ad5d49 commit 44ceb8e
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -186,6 +186,8 @@ public static Path getDataFolder(String pi, String dataFolderName, String dataRe
*/
public static Path getDataFilePath(String pi, String dataFolderName, String altDataFolderName, String fileName)
throws PresentationException, IndexUnreachableException {
//make sure fileName is a pure filename and not a path
fileName = Paths.get(fileName).getFileName().toString();
java.nio.file.Path dataFolderPath = getDataFolder(pi, dataFolderName);
if (StringUtils.isNotBlank(fileName)) {
dataFolderPath = dataFolderPath.resolve(fileName);
Expand Down

0 comments on commit 44ceb8e

Please sign in to comment.