Project

General

Profile

Actions

Bug #92957

closed

Exception in FileDumpController when trying to download a missing or deleted file using /index.php?eID=dumpFile

Added by Stephan Großberndt almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Must have
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2020-11-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Yes
Sprint Focus:

Description

When trying to download a file using /index.php?eID=dumpFile which is not there (missing or deleted) an exception occurs which leads to HTTP 500 instead of 404:

Core: Exception handler (WEB): 
Uncaught TYPO3 Exception:
Argument 1 passed to TYPO3\CMS\Core\Controller\FileDumpController::isFileValid() must implement interface TYPO3\CMS\Core\Resource\FileInterface, null given,
called in /typo3_src-9.5.23/typo3/sysext/core/Classes/Controller/FileDumpController.php on line 67
TypeError thrown in file /typo3_src-9.5.23/typo3/sysext/core/Classes/Controller/FileDumpController.php in line 114.
Requested URL: https://example.org/index.php?eID=dumpFile&t=f&f=4711&token=--AnonymizedToken--&download=

This happens because $file is set to NULL and then passed to isFileValid() which expects $file not to be NULL:

if ($file->isDeleted() || $file->isMissing()) {
  $file = null;
}
if (!$this->isFileValid($file)) {
  $file = null;
}

This is a regression of #91754 / https://review.typo3.org/c/Packages/TYPO3.CMS/+/65126

Actions #1

Updated by Stephan Großberndt almost 4 years ago

  • Due date set to 2020-07-07
  • Start date changed from 2020-11-30 to 2020-07-07
Actions #2

Updated by Stephan Großberndt almost 4 years ago

  • Due date deleted (2020-07-07)
  • Start date changed from 2020-07-07 to 2020-11-30
Actions #3

Updated by Gerrit Code Review almost 4 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/+/66947

Actions #4

Updated by Gerrit Code Review almost 4 years ago

Patch set 2 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/+/66947

Actions #5

Updated by Gerrit Code Review almost 4 years ago

Patch set 3 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/+/66947

Actions #6

Updated by Gerrit Code Review over 3 years ago

Patch set 4 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/+/66947

Actions #7

Updated by Gerrit Code Review over 3 years ago

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

Actions #8

Updated by Stephan Großberndt over 3 years ago

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

Updated by Gerrit Code Review over 3 years ago

  • Status changed from Resolved to Under Review

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/+/68897

Actions #10

Updated by Stephan Großberndt over 3 years ago

  • Status changed from Under Review to Resolved
Actions #11

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF