diff --git a/src/youtube.js b/src/youtube.js index be6a8323..6abf8ab7 100644 --- a/src/youtube.js +++ b/src/youtube.js @@ -100,6 +100,14 @@ var YouTubeClient = GObject.registerClass({ break; } const ytUri = `https://www.youtube.com${ytPath}`; + if( + /* check if site has "/" after ".com" */ + ytUri[23] !== '/' + || !Gst.Uri.is_valid(ytUri) + ) { + debug(`misformed player URI: ${ytUri}`); + break; + } debug(`found player URI: ${ytUri}`); /* TODO: cache */