diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java index e76d1f3..79229bf 100644 --- a/.mvn/wrapper/MavenWrapperDownloader.java +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -1,18 +1,6 @@ -/* - * Copyright 2007-present the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + +import io.github.pixee.security.HostValidator; +import io.github.pixee.security.Urls; import java.net.*; import java.io.*; import java.nio.channels.*; @@ -105,7 +93,7 @@ protected PasswordAuthentication getPasswordAuthentication() { } }); } - URL website = new URL(urlString); + URL website = Urls.create(urlString, Urls.HTTP_PROTOCOLS, HostValidator.DENY_COMMON_INFRASTRUCTURE_TARGETS); ReadableByteChannel rbc; rbc = Channels.newChannel(website.openStream()); FileOutputStream fos = new FileOutputStream(destination); diff --git a/pom.xml b/pom.xml index a480a00..6b55e84 100644 --- a/pom.xml +++ b/pom.xml @@ -18,6 +18,7 @@ PoC for a REST API made with Spring Boot using Initializr 21 + 1.2.1