From 936c0f6d5d3f5a811110f7add4fa688a3e9a8377 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 25 Apr 2022 12:49:48 +0200 Subject: [PATCH] Set explicit `referrerpolicy` for YouTube embeds YouTube requires the `Referer` header to be set for (some) embeds to work. By using the attribute any `referrer-policy` header set on the top level document is overridden (e.g. `same-origin`). Co-authored-by: Sascha Greuel --- com.woltlab.wcf/mediaProvider.xml | 2 +- .../bbcode/media/provider/YouTubeBBCodeMediaProvider.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.woltlab.wcf/mediaProvider.xml b/com.woltlab.wcf/mediaProvider.xml index f224e89310..a1048da2ca 100644 --- a/com.woltlab.wcf/mediaProvider.xml +++ b/com.woltlab.wcf/mediaProvider.xml @@ -10,7 +10,7 @@ https?://(?:.+?\.)?youtube.com/shorts/(?P[a-zA-Z0-9_-]+)]]> YouTube Playlist [a-zA-Z0-9_-]+)]]> - ]]> + ]]> Vimeo diff --git a/wcfsetup/install/files/lib/system/bbcode/media/provider/YouTubeBBCodeMediaProvider.class.php b/wcfsetup/install/files/lib/system/bbcode/media/provider/YouTubeBBCodeMediaProvider.class.php index e835a85fa7..c48471fe59 100644 --- a/wcfsetup/install/files/lib/system/bbcode/media/provider/YouTubeBBCodeMediaProvider.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/media/provider/YouTubeBBCodeMediaProvider.class.php @@ -28,7 +28,7 @@ class YouTubeBBCodeMediaProvider implements IBBCodeMediaProvider $start = $this->timeToSeconds($startParameter); $end = $this->timeToSeconds($endParameter); - return '
'; + return '
'; } /** -- 2.20.1