67495[FEATURE] Add referer header to fetch oembed json for embedded videos
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 6
- typo3/sysext/backend/Configuration/SiteConfiguration/site.php2+9 −1
- typo3/sysext/backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf+3 −0
- typo3/sysext/backend/Resources/Private/Language/siteconfiguration_fieldinformation.xlf1+3 −0
- typo3/sysext/core/Classes/Resource/OnlineMedia/Helpers/AbstractOEmbedHelper.php8+68 −7
- typo3/sysext/core/Classes/Resource/OnlineMedia/Helpers/VimeoHelper.php+14 −0
- typo3/sysext/core/Documentation/Changelog/master/Feature-87528-VimeoHelperAbstractOEmbedHelperMustSendRefererHeaderToFetchProperOEmbedjsonForVideos.rstnew+20 −0
Review log 1217
-
Pascal Rinker uploaded patch set 1 01/21/21, 11:37
-
TYPO3com voted on patch set 1 V -1 01/21/21, 11:37 Completed build in 18s on Thu, 21 Jan, 11:37 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8960
-
Pascal Rinker uploaded patch set 2 01/21/21, 12:25
-
TYPO3com voted on patch set 2 V -1 01/21/21, 12:36 Completed build in 10m 35s on Thu, 21 Jan, 12:36 PM Test Summary: 32601 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8962
-
Pascal Rinker uploaded patch set 3 01/21/21, 13:10
-
TYPO3com voted on patch set 3 V +1 01/21/21, 13:20 Completed build in 10m 29s on Thu, 21 Jan, 01:20 PM Test Summary: 32601 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8963
-
Stefan Froemken commented on patch set 3 CR -1 01/22/21, 09:45
IMO SiteConfiguration is a good place to solve this problem, but we should prevent requesting vimeo API a hundred times, if this checkbox is activated for all SiteConfiguration. You have declared this patch as FEATURE. TYPO3 9 and 10 are Feature freeze. Maybe as BUGFIX this patch has the possibility to get in these releases.Unresolved
I would prefer "Add referer header". In case of HTTP header it is called "referer". But yes, in english language it is called "referrer"Unresolved
"a HTTP referer"site.php:69UnresolvedCan you please add a defaultsiteconfiguration_fieldinformation.xlf:19UnresolvedIn commit message you say it's just for Vimeo requests.AbstractOEmbedHelper.php:71UnresolvedgetAllSites() just have this annotation. So no need to add it here againAbstractOEmbedHelper.php:79I don't like this approach. Annotations let me expect that result is an array containing Site objects.AbstractOEmbedHelper.php:104Check if result of getSitesForOEmbedRequest is empty array and start a single request without HTTP referer. Else loop and start individual requests. Move request code into its own method with Site and Header as argument. What, if you have 100 SiteConfiguration and 80 of them are marked as "useAsRefererForOEmbedHelperRequests". I prefer to stop after 3 or 5 requests to prevent memory_limits or max_execution_time problems. -
Oli Bartsch commented on patch set 3 01/22/21, 10:34
I'm missing some tests for this feature.AbstractOEmbedHelper.php:89Since we are in an abstract class, please make this method an abstract method. So extending classes have to implement it properly. And sth. like `isValidOEmbedDataRespose()` would suite better IMO. -
Pascal Rinker commented on patch set 3 01/22/21, 14:49
AbstractOEmbedHelper.php:79Reply UnresolvedYou're right, this was just to move that if into this method. What do you think about putting a n condition in getOEmbedData() after calling this method to check if the array is not empty. Then the method only returns Sites or an empty array.AbstractOEmbedHelper.php:89ReplyI wanted to make this an abstract method too but then it's a breaking change. Other extensions like ext:youku would stop working. Really like `isValidOEmbedDataRespose()` and will change that.AbstractOEmbedHelper.php:104Reply UnresolvedThis is a hard one. If a user checks 80 configurations to be used as referer, then 80 requests should be fired imo. Otherwise the user is frustrated because he checks the option and his config will be ignored because it's number 6 or so. Maybe a notice like "too many sites as referer may affect the performance" or so is what we want? -
Pascal Rinker uploaded patch set 4 01/22/21, 14:56
-
TYPO3com voted on patch set 4 V +1 01/22/21, 15:06 Completed build in 09m 46s on Fri, 22 Jan, 03:06 PM Test Summary: 32601 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8989
-
Oli Bartsch commented on patch set 4 01/22/21, 15:09
AbstractOEmbedHelper.php:89ReplyAck -
Andreas Kienast updated the commit message in patch set 5 01/22/21, 16:47
-
Andreas Kienast commented on patch set 5 01/22/21, 16:48
FYI: Since this is a feature, I've removed 10.4 and 9.5 from the "Releases" line. Usually, features don't go into already released versions unless absolutely mandatory. -
TYPO3com voted on patch set 5 V +1 01/22/21, 17:07 Completed build in 17m 49s on Fri, 22 Jan, 05:07 PM Test Summary: 32601 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8996
-
Georg Ringer commented on patch set 5 01/25/21, 14:22
site.php:65UnresolvedI would like to see no additional UI field but a config via yml only -
Benni Mack abandoned the change 11/27/21, 12:46
I will abandon this change now ... there was no movement since initial feedback of various people. Can be restored at a later time.