Make the watch route generate a full YouTube URL (fixes #402)
This commit is contained in:
parent
7f28275fb0
commit
732baccd63
3 changed files with 23 additions and 4 deletions
|
@ -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'];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue