Bug #92957
closedException in FileDumpController when trying to download a missing or deleted file using /index.php?eID=dumpFile
100%
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
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
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
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
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
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
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
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
Updated by Stephan Großberndt over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 932ff134418df0ddce498a6e6b6e344d1fa18484.
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
Updated by Stephan Großberndt over 3 years ago
- Status changed from Under Review to Resolved
Applied in changeset 17737400858ebad6e1f75903d4302ada45cadb63.