Skip to content

Commit

Permalink
Update base directory path
Browse files Browse the repository at this point in the history
Update base directory path with normalized base directory path
  • Loading branch information
SavinduDimal committed Jun 19, 2024
1 parent c0ce919 commit cc24110
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ private static Path resolveFilePath(final String baseDirPathString,
* If the resolved path does not start with the base directory path,
* it indicates an attempt to escape the intended directory structure.
*/
if (!resolvedPath.startsWith(baseDirPath)) {
if (!resolvedPath.startsWith(baseDirPath.normalize())) {
throw new APIManagementException("Error resolving path. The user path attempts" +
" to escape the base directory.");
}
Expand Down

0 comments on commit cc24110

Please sign in to comment.