Project

General

Profile

Actions

Bug #87529

closed

AbstractOEmbedHelper::transformMediaIdToFile() must check if $oEmbed['title'] is set before using it.

Added by Leonie Philine over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2019-01-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This bug is one of the two little sidekicks of https://forge.typo3.org/issues/87528.

In TYPO3 8 AND 9, \TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\AbstractOEmbedHelper::transformMediaIdToFile() contains the following passage:

            $oEmbed = $this->getOEmbedData($mediaId);
            if (!empty($oEmbed)) {
                $fileName = $oEmbed['title'] . '.' . $fileExtension;
            } else {
                $fileName = $mediaId . '.' . $fileExtension;
            }

Under some circumstances, $oEmbed['title'] is not set - for example for privacy-restricted Vimeo videos due to a missing Referer header; but that's a separate bug: https://forge.typo3.org/issues/87528 . Despite what's in #87528, still testing for !empty($oEmbed) and using $oEmbed['title'] is a logical fault. :) So one bug must be fixed independently from the other.

When $oEmbed['title'] is not set, the file will be saved successfully, but as a hidden file, due to its filename ".vimeo". All further retries fail, because TYPO3 (actually the local driver) "knows" the file is there and acts accordingly, but does not show the file to the user due to the filterHiddenFilesAndFolders default filter.

Therefore, when $oEmbed['title'] is not set then $fileName = $mediaId . '.' . $fileExtension; must be used.


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #90860: Private vimeo videos are stored as ".vimeo" in the file listClosed2020-03-27

Actions
Actions

Also available in: Atom PDF