mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-26 19:15:09 +00:00
Merge branch 'master' of https://github.com/jenkinsci/jenkins into anonymous-to-lambda
This commit is contained in:
380 files changed
+2454
-23429
No files matched your search
@@ -35,7 +35,6 @@ import hudson.model.AbstractProject;
|
||||
import hudson.model.Computer;
|
||||
import hudson.model.Item;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.os.PosixAPI;
|
||||
import hudson.os.PosixException;
|
||||
import hudson.remoting.Callable;
|
||||
import hudson.remoting.Channel;
|
||||
@@ -697,7 +696,7 @@ public final class FilePath implements SerializableOnlyOverRemoting {
|
||||
while (entries.hasMoreElements()) {
|
||||
ZipEntry e = entries.nextElement();
|
||||
File f = new File(dir, e.getName());
|
||||
if (!f.getCanonicalPath().startsWith(dir.getCanonicalPath())) {
|
||||
if (!f.getCanonicalFile().toPath().startsWith(dir.getCanonicalPath())) {
|
||||
throw new IOException(
|
||||
"Zip " + zipFile.getPath() + " contains illegal file name that breaks out of the target directory: " + e.getName());
|
||||
}
|
||||
@@ -1013,7 +1012,7 @@ public final class FilePath implements SerializableOnlyOverRemoting {
|
||||
timestamp.touch(sourceTimestamp);
|
||||
return true;
|
||||
} catch (IOException x) {
|
||||
Functions.printStackTrace(x, listener.error("Failed to download " + archive + " from agent; will retry from master"));
|
||||
Functions.printStackTrace(x, listener.error("Failed to download " + archive + " from agent; will retry from controller"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1895,11 +1894,7 @@ public final class FilePath implements SerializableOnlyOverRemoting {
|
||||
// Anyway the existing calls already skip this method if on Windows.
|
||||
if (File.pathSeparatorChar==';') return; // noop
|
||||
|
||||
if (Util.NATIVE_CHMOD_MODE) {
|
||||
PosixAPI.jnr().chmod(f.getAbsolutePath(), mask);
|
||||
} else {
|
||||
Files.setPosixFilePermissions(fileToPath(f), Util.modeToPermissions(mask));
|
||||
}
|
||||
Files.setPosixFilePermissions(fileToPath(f), Util.modeToPermissions(mask));
|
||||
}
|
||||
|
||||
private static boolean CHMOD_WARNED = false;
|
||||
|
||||
Reference in new issue
Block a user