Skip to content

Commit 314ca8b

Browse files
authored
Merge branch 'master' into progressive-rendering-fix
2 parents 559ab6e + e3d8325 commit 314ca8b

File tree

9 files changed

+313
-207
lines changed

9 files changed

+313
-207
lines changed

bom/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ THE SOFTWARE.
4141
<commons-fileupload2.version>2.0.0-M4</commons-fileupload2.version>
4242
<groovy.version>2.4.21</groovy.version>
4343
<jelly.version>1.1-jenkins-20250731</jelly.version>
44-
<stapler.version>2065.v7db_c1fcf0a_d0</stapler.version>
44+
<stapler.version>2072.ve00de895a_40c</stapler.version>
4545
</properties>
4646

4747
<dependencyManagement>
@@ -109,7 +109,7 @@ THE SOFTWARE.
109109
<dependency>
110110
<groupId>commons-codec</groupId>
111111
<artifactId>commons-codec</artifactId>
112-
<version>1.20.0</version>
112+
<version>1.21.0</version>
113113
</dependency>
114114
<dependency>
115115
<groupId>commons-collections</groupId>

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
},
2525
"devDependencies": {
2626
"@babel/cli": "7.28.6",
27-
"@babel/core": "7.28.6",
28-
"@babel/preset-env": "7.28.6",
27+
"@babel/core": "7.29.0",
28+
"@babel/preset-env": "7.29.0",
2929
"@eslint/js": "9.39.2",
3030
"babel-loader": "10.0.0",
3131
"clean-webpack-plugin": "4.0.0",
@@ -34,7 +34,7 @@
3434
"eslint": "9.39.2",
3535
"eslint-config-prettier": "10.1.8",
3636
"eslint-formatter-checkstyle": "9.0.1",
37-
"globals": "17.2.0",
37+
"globals": "17.3.0",
3838
"handlebars-loader": "1.7.3",
3939
"mini-css-extract-plugin": "2.10.0",
4040
"postcss": "8.5.6",
@@ -45,7 +45,7 @@
4545
"sass": "1.97.3",
4646
"sass-loader": "16.0.6",
4747
"style-loader": "4.0.0",
48-
"stylelint": "17.0.0",
48+
"stylelint": "17.1.0",
4949
"stylelint-checkstyle-reporter": "1.1.1",
5050
"stylelint-config-standard-scss": "17.0.0",
5151
"webpack": "5.104.1",

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ THE SOFTWARE.
7373
</issueManagement>
7474

7575
<properties>
76-
<revision>2.549</revision>
76+
<revision>2.550</revision>
7777
<changelist>-SNAPSHOT</changelist>
78-
<project.build.outputTimestamp>2026-01-27T06:42:55Z</project.build.outputTimestamp>
78+
<project.build.outputTimestamp>2026-02-03T15:52:43Z</project.build.outputTimestamp>
7979

8080
<!-- configuration for patch tracker plugin -->
8181
<project.patchManagement.system>github</project.patchManagement.system>

src/main/scss/base/_style.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ td.no-wrap {
7171
padding: 0.5em;
7272
-moz-border-radius: 0.5em;
7373
border-radius: var(--form-input-border-radius);
74+
position: relative;
75+
z-index: 103;
7476
}
7577

7678
#shutdown-msg {
@@ -82,6 +84,8 @@ td.no-wrap {
8284
padding: 0.5em;
8385
-moz-border-radius: 0.5em;
8486
border-radius: var(--form-input-border-radius);
87+
position: relative;
88+
z-index: 103;
8589
}
8690

8791
a.lowkey:link {

test/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ THE SOFTWARE.
192192
<dependency>
193193
<groupId>org.jenkins-ci.main</groupId>
194194
<artifactId>jenkins-test-harness</artifactId>
195-
<version>2545.va_5c4d760c7ef</version>
195+
<version>2553.vd280528b_dde3</version>
196196
<scope>test</scope>
197197
<exclusions>
198198
<exclusion>

test/src/test/java/hudson/model/DirectoryBrowserSupportTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
package hudson.model;
2626

27+
import static hudson.model.WindowsUtil.isWindowsSymlinkSupported;
2728
import static org.hamcrest.MatcherAssert.assertThat;
2829
import static org.hamcrest.Matchers.allOf;
2930
import static org.hamcrest.Matchers.contains;
@@ -589,6 +590,8 @@ public boolean delete() {
589590
@Test
590591
@Issue("SECURITY-904")
591592
void symlink_outsideWorkspace_areNotAllowed() throws Exception {
593+
assumeTrue(!Functions.isWindows() || isWindowsSymlinkSupported());
594+
592595
FreeStyleProject p = j.createFreeStyleProject();
593596

594597
File secretsFolder = new File(j.jenkins.getRootDir(), "secrets");
@@ -728,6 +731,8 @@ void symlink_outsideWorkspace_areNotAllowed() throws Exception {
728731
@Test
729732
@Issue("SECURITY-904")
730733
void symlink_avoidLeakingInformation_aboutIllegalFolder() throws Exception {
734+
assumeTrue(!Functions.isWindows() || isWindowsSymlinkSupported());
735+
731736
FreeStyleProject p = j.createFreeStyleProject();
732737

733738
File secretsFolder = new File(j.jenkins.getRootDir(), "secrets");
@@ -800,7 +805,7 @@ void symlink_avoidLeakingInformation_aboutIllegalFolder() throws Exception {
800805
@Test
801806
@Issue("SECURITY-904")
802807
void junctionAndSymlink_outsideWorkspace_areNotAllowed_windowsJunction() throws Exception {
803-
assumeTrue(Functions.isWindows());
808+
assumeTrue(Functions.isWindows() && isWindowsSymlinkSupported());
804809

805810
FreeStyleProject p = j.createFreeStyleProject();
806811

@@ -1020,6 +1025,8 @@ void directSymlink_forTestingZip() throws Exception {
10201025
@Test
10211026
@Issue({"SECURITY-904", "SECURITY-1452"})
10221027
void symlink_insideWorkspace_areNotAllowedAnymore() throws Exception {
1028+
assumeTrue(!Functions.isWindows() || isWindowsSymlinkSupported());
1029+
10231030
FreeStyleProject p = j.createFreeStyleProject();
10241031

10251032
// build once to have the workspace set up
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/*
2+
* The MIT License
3+
*
4+
* Copyright (c) 2026
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
* THE SOFTWARE.
23+
*/
24+
25+
package hudson.model;
26+
27+
import static org.junit.jupiter.api.Assertions.assertTrue;
28+
29+
import java.io.IOException;
30+
import java.nio.file.Files;
31+
import java.nio.file.Path;
32+
import java.util.concurrent.atomic.AtomicReference;
33+
34+
/**
35+
* Utility methods for Windows specific details on tests.
36+
*
37+
* @author Mark Waite
38+
*/
39+
public class WindowsUtil {
40+
41+
private static final AtomicReference<Boolean> symlinkSupported = new AtomicReference<>();
42+
43+
/**
44+
* Fail the test if running in CI and symlinks are not supported.
45+
* We do not want to fail the test on a developer computer if
46+
* symlinks are not enabled, but we do want to fail the test if a
47+
* CI agent on Windows does not have symbolic links enabled.
48+
*/
49+
private static void assertConfiguration(boolean supported) {
50+
if (System.getenv("CI") != null) {
51+
assertTrue(supported, "Jenkins CI configurations must enable symlinks on Windows");
52+
}
53+
}
54+
55+
/**
56+
* Returns true if Windows allows a symbolic link to be created.
57+
*
58+
* @return true if Windows allows a symbolic link to be created.
59+
* @throws IOException if creation or removal of temporary files fails
60+
*/
61+
public static boolean isWindowsSymlinkSupported() throws IOException {
62+
// Fast path, don't acquire unnecessary lock
63+
Boolean supported = symlinkSupported.get();
64+
if (supported != null) {
65+
assertConfiguration(supported);
66+
return supported;
67+
}
68+
synchronized (WindowsUtil.class) {
69+
supported = symlinkSupported.get();
70+
if (supported != null) {
71+
assertConfiguration(supported);
72+
return supported;
73+
}
74+
Path tempDir = Files.createTempDirectory("symlink-check");
75+
Path target = Files.createFile(tempDir.resolve("target.txt"));
76+
Path link = tempDir.resolve("link.txt");
77+
78+
try {
79+
Files.createSymbolicLink(link, target);
80+
Files.delete(link);
81+
symlinkSupported.set(true);
82+
} catch (IOException | UnsupportedOperationException uoe) {
83+
symlinkSupported.set(false);
84+
} finally {
85+
Files.delete(target);
86+
Files.delete(tempDir);
87+
}
88+
}
89+
assertConfiguration(symlinkSupported.get());
90+
return symlinkSupported.get();
91+
}
92+
}

test/src/test/java/hudson/tasks/ArtifactArchiverTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
package hudson.tasks;
2626

27+
import static hudson.model.WindowsUtil.isWindowsSymlinkSupported;
2728
import static org.hamcrest.MatcherAssert.assertThat;
2829
import static org.hamcrest.Matchers.lessThan;
2930
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
@@ -281,6 +282,7 @@ void followSymlinksEnabledForOldConfig() throws Exception {
281282
@Issue("SECURITY-162")
282283
@Test
283284
void outsideSymlinks() throws Exception {
285+
assumeTrue(!Functions.isWindows() || isWindowsSymlinkSupported());
284286
final FreeStyleProject p = j.createFreeStyleProject();
285287
p.getBuildersList().add(new TestBuilder() {
286288
@Override public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
@@ -519,6 +521,7 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListen
519521
@Test
520522
@Issue("JENKINS-55049")
521523
void lengthOfArtifactIsCorrect_eventForInvalidSymlink() throws Exception {
524+
assumeTrue(!Functions.isWindows() || isWindowsSymlinkSupported());
522525
FreeStyleProject p = j.createFreeStyleProject();
523526
p.getBuildersList().add(new TestBuilder() {
524527
@Override public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {

0 commit comments

Comments
 (0)