88280[BUGFIX] Prevent FAL files getting wrongly moved outside of storage
Commit message
Review
-
Code review CR 0
-
Verified V 0
- core-ci +1 CI
Issues 2
Files 1
Review log 1214
-
Garvin Hicking uploaded patch set 1 02/19/25, 14:34
-
Garvin Hicking commented on patch set 1 CR -1 02/19/25, 14:36
This is only half of the solution for now. The real "bug" is that a < 150px image is not properly persisted. -
core-ci voted on patch set 1 V +1 02/19/25, 14:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74392
-
Garvin Hicking updated the commit message in patch set 2
CR -1V +102/19/25, 15:07 -
Garvin Hicking commented on patch set 2 02/19/25, 15:08
See https://forge.typo3.org/issues/106213 and patch for the fix of the "root cause" of this code branch getting triggered. -
core-ci voted on patch set 2 V +1 02/19/25, 15:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74395
-
Christian Kuhn commented on patch set 2 CR +1 V +1 02/19/25, 17:32
this looks good to me and i think its safe. did we miss something? -
Stefan Bürk commented on patch set 2 02/19/25, 18:16
LocalDriver.php:728I have some concerns here due to unsafe usage of realpath(). Background: `addFile()` is API and can be called by any extension code in some way providing anything they want. If `addFile()` is called with some non existing `$fileLocalFilePath`, realpath() would return boolean false leadon to an unhandled TypeError here. That case **should** be handled properly. Beside that, I wonder if realpath transformation needs to be done in more places and what habbens with mixed path informations between symlinked/linked absolute paths - both beeing valid in other methods / storage handling in general. Or should the storage not "work" completey with the realpath in any context ? not sure if that is a bigger issue. -
Christian Kuhn voted on patch set 2 CR 0 V 0 02/19/25, 18:56
-
Garvin Hicking commented on patch set 2 02/19/25, 20:40
LocalDriver.php:728Reply UnresolvedGood you bring this up. However, this is the LocalDriver, filesystem based. IMO remote storages and others are not covered?! The problem I see is the current situation can be bad and lead to loss of data. We could maybe safeguard this by doing "is_dir" checks before doing realpath. What do you think? -
Stefan Bürk commented on patch set 2 04/11/25, 12:33
The issue is slightly complexer, trying now to add tests to this change to show case this first. Also setting the change to WIP for now as it is not near to a solution, hope that is okay for you @gh@faktor-e.de -
Stefan Bürk marked it work in progress 04/11/25, 12:33
-
Garvin Hicking commented on patch set 2 04/11/25, 12:35
Reply Unresolved
Sure. Please go ahead, thanks for your effort - I believe this is an edgy-case, but it's effects are critical. The possibility that this happens was largely reduced with #106213 so it's not pressing to me at this point. -
Garvin Hicking abandoned the change 09/18/25, 18:03
lost interest