Project

General

Profile

Actions

Bug #93805

closed

DeleteUploadsFinisher deletes top level upload folder

Added by Ralf Zimmermann over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Must have
Category:
Form Framework
Target version:
-
Start date:
2021-03-23
Due date:
% Done:

100%

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

Description

The initial security fix for Mitigate directly accessible file upload in form framework was designed that way that uploaded files are stored within 2 levels of random named sub folders within the configured "saveToFileMount" path.
While developing the patch there was several refactorings and now only one random named subfolder is created.
While developing the patch the DeleteUploadsFinisher was adjusted to delete 2 levels of parent folders (if these are empty) while UploadedFileReferenceConverter was implemented to generate 2 levels of random named sub folders. The UploadedFileReferenceConverter changes was never adjusted within the DeleteUploadsFinisher.
This finisher now tries to delete 2 levels of parent folders if these are empty instead of one.
If a form upload is configured to save files within "1:/user_upload/test/" (saveToFileMount: '1:/user_upload/test/'), an upload will be saved within "1:/user_upload/test/form_<random>/file.png". Lateron, the DeleteUploadsFinisher delete "1:/user_upload/test/form_<random>/file.png" (ok). If "1:/user_upload/test/form_<random>/" is emty, this folder will be deleted too (ok). If "1:/user_upload/test/" is emty, this folder will be deleted too (not ok).

Actions #1

Updated by Gerrit Code Review over 3 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/+/68562

Actions #2

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

Actions #3

Updated by Ralf Zimmermann over 3 years ago

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

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

Actions #5

Updated by Ralf Zimmermann over 3 years ago

  • Status changed from Under Review to Resolved
Actions #6

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF