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 #1

Updated by Gerrit Code Review about 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59878

Actions #2

Updated by Gerrit Code Review about 5 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59900

Actions #3

Updated by Anonymous about 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions #5

Updated by Georg Ringer about 4 years ago

  • Has duplicate Bug #90860: Private vimeo videos are stored as ".vimeo" in the file list added
Actions

Also available in: Atom PDF