fixed YoutubePlaylistLinkHandlerFactory accepting invalid links

This commit is contained in:
Connectety-W 2019-01-27 12:05:36 +01:00
parent 1ab7a1f930
commit 6390eb268b
No known key found for this signature in database
GPG key ID: 8F39B4F36D48B3F8

View file

@ -30,6 +30,11 @@ public class YoutubePlaylistLinkHandlerFactory extends ListLinkHandlerFactory {
throw new ParsingException("the url given is not a Youtube-URL");
}
String path = urlObj.getPath();
if (!path.equals("/watch" ) && !path.equals("/playlist")) {
throw new ParsingException("the url given is neither a video nor a playlist URL");
}
String listID = Utils.getQueryValue(urlObj, "list");
if (listID == null) {