Skip to content

Commit 4439998

Browse files
authored
Merge branch 'master' into chore/remove-commons-lang-2.6
2 parents 5e74248 + 940f22a commit 4439998

File tree

103 files changed

+1499
-519
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1499
-519
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
<!-- Comment:
2+
!!! ⚠️ IMPORTANT ⚠️ !!!
3+
Do not remove any of the sections below, even if they are not applicable to your change. The sections are used by the
4+
changelog generator and other tools to extract information about the change. If a section is not applicable,
5+
leave as is. Carefully read the instructions in each section and provide the necessary information.
6+
7+
Pull requests that do not follow the template might be closed without further review.
8+
-->
9+
110
<!-- Comment:
211
A great PR typically begins with the line below.
312
Replace <issue-number> with the issue number.

ath.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -o xtrace
66
cd "$(dirname "$0")"
77

88
# https://github.com/jenkinsci/acceptance-test-harness/releases
9-
export ATH_VERSION=6536.vedb_8c398315e
9+
export ATH_VERSION=6578.vcd7330d974d1
1010

1111
if [[ $# -eq 0 ]]; then
1212
export JDK=21

bom/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ THE SOFTWARE.
3838
<description>The module contains dependencies that are used by a specific Jenkins version</description>
3939

4040
<properties>
41-
<commons-fileupload2.version>2.0.0-M4</commons-fileupload2.version>
41+
<commons-fileupload2.version>2.0.0-M5</commons-fileupload2.version>
4242
<groovy.version>2.4.21</groovy.version>
4343
<jelly.version>1.1-jenkins-20250731</jelly.version>
44-
<stapler.version>2074.v6ff4fa_fccff7</stapler.version>
44+
<stapler.version>2076.v1b_a_c12445eb_e</stapler.version>
4545
</properties>
4646

4747
<dependencyManagement>
@@ -63,15 +63,15 @@ THE SOFTWARE.
6363
<dependency>
6464
<groupId>org.springframework</groupId>
6565
<artifactId>spring-framework-bom</artifactId>
66-
<version>6.2.15</version>
66+
<version>6.2.16</version>
6767
<type>pom</type>
6868
<scope>import</scope>
6969
</dependency>
7070
<dependency>
7171
<!-- https://docs.spring.io/spring-security/reference/6.3/getting-spring-security.html#getting-maven-no-boot -->
7272
<groupId>org.springframework.security</groupId>
7373
<artifactId>spring-security-bom</artifactId>
74-
<version>6.5.7</version>
74+
<version>6.5.8</version>
7575
<type>pom</type>
7676
<scope>import</scope>
7777
</dependency>

core/src/main/java/hudson/cli/BuildCommand.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -221,21 +221,7 @@ protected int run() throws Exception {
221221

222222
@Override
223223
protected void printUsageSummary(PrintStream stderr) {
224-
stderr.println(
225-
"""
226-
Starts a build, and optionally waits for a completion.
227-
Aside from general scripting use, this command can be
228-
used to invoke another job from within a build of one job.
229-
With the -s option, this command changes the exit code based on
230-
the outcome of the build (exit code 0 indicates a success)
231-
and interrupting the command will interrupt the job.
232-
With the -f option, this command changes the exit code based on
233-
the outcome of the build (exit code 0 indicates a success)
234-
however, unlike -s, interrupting the command will not interrupt
235-
the job (exit code 125 indicates the command was interrupted).
236-
With the -c option, a build will only run if there has been
237-
an SCM change."""
238-
);
224+
stderr.println(Messages.BuildCommand_PrintUsageSummary());
239225
}
240226

241227
public static class CLICause extends UserIdCause {

core/src/main/java/hudson/model/Cause.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ private UpstreamCause(String upstreamProject, int upstreamBuild, String upstream
199199
this.upstreamCauses = upstreamCauses;
200200
}
201201

202+
@Override
203+
public void onLoad(@NonNull Run<?, ?> build) {
204+
onLoad(build.getParent(), build.getNumber());
205+
}
206+
202207
@Override
203208
public void onLoad(@NonNull Job<?, ?> _job, int _buildNumber) {
204209
Item i = Jenkins.get().getItemByFullName(this.upstreamProject);

core/src/main/java/hudson/model/ManagementLink.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ public enum Category {
174174
* Configuration pages that don't fit into a more specific section.
175175
*/
176176
CONFIGURATION(Messages._ManagementLink_Category_CONFIGURATION()),
177+
/**
178+
* Configuration pages related to plugin management, including installation,
179+
* updates, and administrative actions for maintaining installed plugins.
180+
*/
181+
@Restricted(NoExternalUse.class)
182+
PLUGINS(Messages._ManagementLink_Category_PLUGINS()),
177183
/**
178184
* Security related options. Useful for plugins providing security related {@code ManagementLink}s (e.g. security realms).
179185
* Use {@link Category#STATUS} instead if the feature is informational.

core/src/main/java/hudson/model/RunParameterValue.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@
2828
import hudson.EnvVars;
2929
import java.util.Locale;
3030
import jenkins.model.Jenkins;
31+
import jenkins.util.SystemProperties;
3132
import org.kohsuke.stapler.DataBoundConstructor;
3233
import org.kohsuke.stapler.export.Exported;
3334

3435
public class RunParameterValue extends ParameterValue {
3536

37+
private static /* non-final for Script console */ boolean SKIP_EXISTENCE_CHECK = SystemProperties.getBoolean(RunParameterValue.class.getName() + ".SKIP_EXISTENCE_CHECK", false);
3638
private final String runId;
3739

3840
@DataBoundConstructor
@@ -49,9 +51,19 @@ public RunParameterValue(String name, String runId) {
4951
private static String check(String runId) {
5052
if (runId == null || runId.indexOf('#') == -1) {
5153
throw new IllegalArgumentException(runId);
52-
} else {
53-
return runId;
5454
}
55+
56+
if (!SKIP_EXISTENCE_CHECK) {
57+
try {
58+
if (Run.fromExternalizableId(runId) == null) {
59+
throw new IllegalArgumentException(runId);
60+
}
61+
} catch (RuntimeException e) {
62+
throw new IllegalArgumentException(runId);
63+
}
64+
}
65+
66+
return runId;
5567
}
5668

5769
/**

core/src/main/java/hudson/slaves/OfflineCause.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import edu.umd.cs.findbugs.annotations.CheckForNull;
2828
import edu.umd.cs.findbugs.annotations.NonNull;
29+
import hudson.Util;
2930
import hudson.model.Computer;
3031
import hudson.model.User;
3132
import java.io.ObjectStreamException;
@@ -166,7 +167,7 @@ public User getUser() {
166167
* @return the message that was provided when the computer was taken offline
167168
*/
168169
public String getMessage() {
169-
return message;
170+
return Util.escape(message);
170171
}
171172

172173
// Storing the User in a filed was a mistake, switch to userId
@@ -202,6 +203,11 @@ public String getComputerIconAltText() {
202203
public String getIcon() {
203204
return "symbol-person";
204205
}
206+
207+
@Override
208+
public String toString() {
209+
return Util.escape(super.toString());
210+
}
205211
}
206212

207213
public static class ByCLI extends UserCause {

core/src/main/java/hudson/tools/AbstractCommandInstaller.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ public String getToolHome() {
7272
@Override
7373
public FilePath performInstallation(ToolInstallation tool, Node node, TaskListener log) throws IOException, InterruptedException {
7474
FilePath dir = preferredLocation(tool, node);
75+
dir.mkdirs();
7576
// TODO support Unix scripts with interpreter line (see Shell.buildCommandLine)
76-
FilePath script = dir.createTextTempFile("hudson", getCommandFileExtension(), command);
77+
FilePath script = dir.createTextTempFile("hudson", getCommandFileExtension(), command, false);
7778
try {
7879
String[] cmd = getCommandCall(script);
7980
int r = node.createLauncher(log).launch().cmds(cmd).stdout(log).pwd(dir).join();

core/src/main/java/hudson/util/HttpResponses.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static HttpResponse staticResource(File f) throws IOException {
5656
* Redirect to the given URL via a client-side JS/meta tag redirect.
5757
* @param url the URL to redirect to
5858
* @return the HttpResponse
59-
* @since TODO
59+
* @since 2.550
6060
*/
6161
public static HttpResponse clientRedirectTo(String url) {
6262
return new ClientHttpRedirect(url);

0 commit comments

Comments
 (0)