Skip to content
Open
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 @@ -18,7 +18,9 @@

package org.apache.roller.weblogger.util;

import io.github.pixee.security.HostValidator;
import static io.github.pixee.security.Newlines.stripAll;
import io.github.pixee.security.Urls;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
Expand Down Expand Up @@ -55,7 +57,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();
Expand Down