Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backporting for 2.479.3 LTS (part 3) #10121

Merged
merged 2 commits into from
Jan 6, 2025
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
10 changes: 10 additions & 0 deletions core/src/main/java/hudson/tools/ZipExtractionInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.FileSystemNotFoundException;
import java.nio.file.Path;
import jenkins.MasterToSlaveFileCallable;
import jenkins.model.Jenkins;
import org.jenkinsci.Symbol;
Expand Down Expand Up @@ -117,6 +119,14 @@
} catch (URISyntaxException e) {
return FormValidation.error(e, Messages.ZipExtractionInstaller_malformed_url());
}
if (uri.getScheme() != null && !uri.getScheme().startsWith("http")) {
try {
Path.of(uri);
return FormValidation.ok();
} catch (FileSystemNotFoundException | IllegalArgumentException e) {
return FormValidation.error(e, Messages.ZipExtractionInstaller_malformed_url());

Check warning on line 127 in core/src/main/java/hudson/tools/ZipExtractionInstaller.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 122-127 are not covered by tests
}
}
HttpClient httpClient = ProxyConfiguration.newHttpClient();
HttpRequest httpRequest;
try {
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.29</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.1</winstone.version>
<winstone.version>8.4</winstone.version>
<node.version>20.17.0</node.version>
<!-- frontend-maven-plugin will install this Yarn version as bootstrap, then hand over control to Yarn Berry. -->
<yarn.version>1.22.19</yarn.version>
Expand Down
2 changes: 1 addition & 1 deletion war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-maven-plugin</artifactId>
<version>12.0.13</version>
<version>12.0.16</version>
<configuration>
<!--
Reload webapp when you hit ENTER. (See JETTY-282 for more)
Expand Down
Loading