Project

General

Profile

Actions

Bug #96922

open

FAL file DuplicationBehavior::REPLACE is using public file path

Added by Sascha Egerer about 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2022-02-16
Due date:
% Done:

0%

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

Description

When a file is uploaded with an existing name there are different behaviors to choose from.
One is the DuplicationBehavior::REPLACE which should replace the existing file.

Currently the "public path" of the file is used to get the file on the storage which does not make sense and fails, if the public path is returning something else then it is on the storage.

See https://github.com/TYPO3/typo3/blob/bc15ad4b24a3c76087a2aa1172d44cb84fe0569c/typo3/sysext/core/Classes/Resource/ResourceStorage.php#L2068

The public path must not be used to do file operations on the storage but only to provide a path for the public (web) usage.


Files


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #98005: Use sanitized filename as source identifier when replacing an imageClosed2022-07-22

Actions
Actions #1

Updated by Sascha Egerer over 1 year ago

  • Related to Bug #98005: Use sanitized filename as source identifier when replacing an image added
Actions #2

Updated by Simon Schaufelberger over 1 year ago

Currently the "public path" of the file is used to get the file on the storage which does not make sense and fails, if the public path is returning something else then it is on the storage.

How can this be reproduced?

Actions #3

Updated by Sascha Egerer over 1 year ago

  • File Bildschirmfoto 2022-08-05 um 21.21.49.png added
Actions #4

Updated by Sascha Egerer over 1 year ago

  • File deleted (Bildschirmfoto 2022-08-05 um 21.21.49.png)
Actions #5

Updated by Sascha Egerer over 1 year ago

Add a `baseUri` like `my-custom-uri-path/` in the File Storage record.

Actions

Also available in: Atom PDF