Project

General

Profile

Actions

Bug #96922

open

FAL file DuplicationBehavior::REPLACE is using public file path

Added by Sascha Egerer almost 3 years ago. Updated over 2 years 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

Also available in: Atom PDF