diff --git a/app/pom.xml b/app/pom.xml
index c5461e412..b66270aeb 100644
--- a/app/pom.xml
+++ b/app/pom.xml
@@ -591,8 +591,11 @@ limitations under the License.
5.0.1
test
-
-
+
+ io.github.pixee
+ java-security-toolkit
+
+
diff --git a/app/src/main/java/org/apache/roller/weblogger/util/MediacastUtil.java b/app/src/main/java/org/apache/roller/weblogger/util/MediacastUtil.java
index 35df6e41e..2653955bc 100644
--- a/app/src/main/java/org/apache/roller/weblogger/util/MediacastUtil.java
+++ b/app/src/main/java/org/apache/roller/weblogger/util/MediacastUtil.java
@@ -18,6 +18,8 @@
package org.apache.roller.weblogger.util;
+import io.github.pixee.security.HostValidator;
+import io.github.pixee.security.Urls;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
@@ -54,7 +56,7 @@ public static MediacastResource lookupResource(String url)
MediacastResource resource = null;
try {
- HttpURLConnection con = (HttpURLConnection) new URL(url).openConnection();
+ HttpURLConnection con = (HttpURLConnection) Urls.create(url, Urls.HTTP_PROTOCOLS, HostValidator.DENY_COMMON_INFRASTRUCTURE_TARGETS).openConnection();
con.setRequestMethod("HEAD");
int response = con.getResponseCode();
String message = con.getResponseMessage();
diff --git a/pom.xml b/pom.xml
index 4a8f4993a..90d20a1ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,7 +48,8 @@ limitations under the License.
UTF-8
6.1.4
1.7.36
-
+ 1.2.1
+
app
@@ -110,7 +111,12 @@ limitations under the License.
5.11.0
test
-
+
+ io.github.pixee
+ java-security-toolkit
+ ${versions.java-security-toolkit}
+
+