Make the watch route generate a full YouTube URL (fixes #402)

This commit is contained in:
Pierre Rudloff 2022-02-27 23:32:08 +01:00
parent 7f28275fb0
commit 732baccd63
3 changed files with 23 additions and 4 deletions

View file

@ -169,10 +169,8 @@ abstract class BaseController
*/
protected function getVideoPageUrl(Request $request): string
{
$url = $request->getQueryParam('url') ?: $request->getQueryParam('v');
// Prevent SSRF attacks.
$parts = Url::validateUrl($url, new Options());
$parts = Url::validateUrl($request->getQueryParam('url'), new Options());
return $parts['url'];
}