Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ THE SOFTWARE.
clazz="${page.runs.isEmpty() and page.queueItems.isEmpty() ? 'jenkins-hidden' : ''}"/>

<div class="app-builds-container">
<div id="no-builds" class="app-builds-container__placeholder">
<div id="loading-builds" class="app-builds-container__placeholder">
<l:spinner text="${%Loading builds...}"/>
</div>
<div id="no-builds" style="display:none" class="app-builds-container__placeholder">
${%No builds}
</div>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ THE SOFTWARE.
<bridge-method-injector.version>1.30</bridge-method-injector.version>
<spotless.check.skip>false</spotless.check.skip>
<!-- Make sure to keep the jetty-ee9-maven-plugin version in war/pom.xml in sync with the Jetty release in Winstone: -->
<winstone.version>8.4</winstone.version>
<winstone.version>8.5</winstone.version>
<node.version>20.18.1</node.version>
</properties>

Expand Down
5 changes: 4 additions & 1 deletion src/main/js/pages/project/builds-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const ajaxUrl = buildHistoryPage.getAttribute("page-ajax");
const card = document.querySelector("#jenkins-builds");
const contents = card.querySelector("#jenkins-build-history");
const container = card.querySelector(".app-builds-container");
const loadingBuilds = card.querySelector("#loading-builds");
const noBuilds = card.querySelector("#no-builds");

// Pagination controls
Expand Down Expand Up @@ -58,6 +59,7 @@ function load(options = {}) {
if (responseText.trim() === "") {
contents.innerHTML = "";
noBuilds.style.display = "block";
loadingBuilds.style.display = "none";
updateCardControls({
pageHasUp: false,
pageHasDown: false,
Expand All @@ -69,7 +71,7 @@ function load(options = {}) {

// Show the refreshed builds list
contents.innerHTML = responseText;
noBuilds.style.display = "none";
loadingBuilds.style.display = "none";
behaviorShim.applySubtree(contents);

// Show the card controls
Expand Down Expand Up @@ -146,6 +148,7 @@ document.addEventListener("DOMContentLoaded", function () {
debouncedLoad();
});

container.classList.add("app-builds-container--loading");
load();

window.addEventListener("focus", function () {
Expand Down
2 changes: 1 addition & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>2370.vfb_b_0c547a_659</version>
<version>2414.v185474555e66</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down
2 changes: 1 addition & 1 deletion test/src/test/java/hudson/PluginTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class PluginTest {
r.createWebClient().assertFails("plugin/matrix-auth/images/%2e%2e%2fWEB-INF/licenses.xml", HttpServletResponse.SC_BAD_REQUEST);
r.createWebClient().assertFails("plugin/matrix-auth/images/%2e.%2fWEB-INF/licenses.xml", HttpServletResponse.SC_BAD_REQUEST);
r.createWebClient().assertFails("plugin/matrix-auth/images/..%2f..%2f..%2f" + r.jenkins.getRootDir().getName() + "%2fsecrets%2fmaster.key", HttpServletResponse.SC_BAD_REQUEST);
r.createWebClient().assertFails("plugin/matrix-auth/" + r.jenkins.getRootDir() + "/secrets/master.key", /* ./ prepended anyway */ Functions.isWindows() ? HttpServletResponse.SC_BAD_REQUEST : HttpServletResponse.SC_NOT_FOUND);
r.createWebClient().assertFails("plugin/matrix-auth/" + r.jenkins.getRootDir() + "/secrets/master.key", /* ./ prepended anyway */ HttpServletResponse.SC_NOT_FOUND);
// SECURITY-155:
r.createWebClient().assertFails("plugin/matrix-auth/WEB-INF/licenses.xml", HttpServletResponse.SC_BAD_REQUEST);
r.createWebClient().assertFails("plugin/matrix-auth/META-INF/MANIFEST.MF", HttpServletResponse.SC_BAD_REQUEST);
Expand Down
13 changes: 3 additions & 10 deletions test/src/test/java/hudson/model/DirectoryBrowserSupportTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,8 @@ public void doubleDots2() throws Exception {

try (JenkinsRule.WebClient wc = j.createWebClient()) {
// normal path provided by the UI succeeds
wc.goTo("job/" + p.getName() + "/ws/abc/def.bin", "application/octet-stream");

// suspicious path is rejected with 400
wc.setThrowExceptionOnFailingStatusCode(false);
HtmlPage page = wc.goTo("job/" + p.getName() + "/ws/abc%5Cdef.bin");
assertEquals(400, page.getWebResponse().getStatusCode());
assertEquals("Error 400 Suspicious Path Character", page.getTitleText());
Page page = wc.goTo("job/" + p.getName() + "/ws/abc%5Cdef.bin", "application/octet-stream");
assertEquals(200, page.getWebResponse().getStatusCode());
}
}

Expand Down Expand Up @@ -1117,11 +1112,9 @@ public void windows_cannotViewAbsolutePath() throws Exception {
Files.writeString(targetTmpPath, content, StandardCharsets.UTF_8);

try (JenkinsRule.WebClient wc = j.createWebClient()) {
// suspicious path is rejected with 400
wc.setThrowExceptionOnFailingStatusCode(false);
HtmlPage page = wc.goTo("userContent/" + targetTmpPath.toAbsolutePath() + "/*view*");
assertEquals(400, page.getWebResponse().getStatusCode());
assertEquals("Error 400 Suspicious Path Character", page.getTitleText());
assertEquals(404, page.getWebResponse().getStatusCode());
}
}

Expand Down
2 changes: 1 addition & 1 deletion war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-maven-plugin</artifactId>
<version>12.0.16</version>
<version>12.0.17</version>
<configuration>
<!--
Reload webapp when you hit ENTER. (See JETTY-282 for more)
Expand Down
Loading