Bug #92957

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

Added by Stephan Großberndt 11 months ago. Updated 5 months 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

#1

Updated by Stephan Großberndt 11 months ago

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

Updated by Stephan Großberndt 11 months ago

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

Updated by Gerrit Code Review 11 months 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

#4

Updated by Gerrit Code Review 11 months 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

#5

Updated by Gerrit Code Review 11 months 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

#6

Updated by Gerrit Code Review 6 months 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

#7

Updated by Gerrit Code Review 6 months 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

#8

Updated by Stephan Großberndt 6 months ago

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

Updated by Gerrit Code Review 6 months 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

#10

Updated by Stephan Großberndt 6 months ago

  • Status changed from Under Review to Resolved
#11

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF