Browse Source

take symlinks into account when expanding archives and checking entries

master
Stefan Bodewig 7 years ago
parent
commit
5a8c37b271
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/Expand.java

+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/Expand.java View File

@@ -333,9 +333,9 @@ public class Expand extends Task {
mappedNames = new String[] {entryName};
}
File f = fileUtils.resolveFile(dir, mappedNames[0]);
if (!allowedOutsideOfDest && !fileUtils.isLeadingPath(dir, f)) {
log("skipping " + entryName + " as its target " + f + " is outside of "
+ dir + ".", Project.MSG_VERBOSE);
if (!allowedOutsideOfDest && !fileUtils.isLeadingPath(dir, f, true)) {
log("skipping " + entryName + " as its target " + f.getCanonicalPath()
+ " is outside of " + dir.getCanonicalPath() + ".", Project.MSG_VERBOSE);
return;
}



Loading…
Cancel
Save