#93972Files with "+" in filename can't be replaced
Description
In TYPO3 10 LTS, files with “+” in filename can’t be replaced using the replace tool in Filelist module.
Instead, the new file is uploaded but it doesn’t replace the old one.
Reviews 1
Related issues 2
History 1213
-
Martin Kutschker commented <span data-processor="relativetime" data-value="2021-04-23T09:07:17+00:00" > 04/23/21, 09:07 </span>
-
Riccardo De Contardi commented and changed attached sky+one.jpg attached sky two.jpeg attached (2)sky+one.jpg attached (2)sky two.jpeg status
NewNeeds Feedback <span data-processor="relativetime" data-value="2022-08-14T14:10:15+00:00" > 08/14/22, 14:10 </span>Is this issue still present?
I tried with the files attached on TYPO3 12.0.0-dev (latest main) – just rename them so their name is identical – and I had no trouble AFAICS
- every time the file has been automatically renamed with the underscore “_” instead of “+” or the space
- the file has been replaced (with the usual modal dialog)Is a different test necessary?
-
Christian Toffolo commented <span data-processor="relativetime" data-value="2022-08-19T09:17:05+00:00" > 08/19/22, 09:17 </span>
Hi Riccardo,
maybe you can’t reproduce the bug because the files with ““ in the name are renamed replacing “” with “_” if uploaded via TYPO3.Instead the problem arise when the file have “+” in the filename when already in the fileserver in case it has been uploaded externally of TYPO3 so not renamed.
-
Riccardo De Contardi commented and changed status
Needs FeedbackNew <span data-processor="relativetime" data-value="2022-08-20T08:30:57+00:00" > 08/20/22, 08:30 </span>I guess that this behavior is expected… As you say, TYPO3 renames the files on upload by itself; if the file with a “weird” name is already present on disk it is not replaced;
The steps to reproduce the problem on TYPO3 11.5.x are the following
1) fresh TYPO3 11.5.x installation
2) Download the files(2)sky+one.jpgand(2)sky+one.jpgattached here insidefileadmin/Images(or another TYPO3 asset folder you like)
3) rename themsky two.jpeg sky+one.jpg
4) download the files
sky+one.jpgandsky+one.jpgattached here somewhere else
5) TYPO3 > Filelist module > folder: “Images” > upload files > choose to upload the new filessky two.jpeg sky+one.jpg
Result:
- the “old” files are kept
- the “new” files are renamed accordingly the TYPO3 rename rules (“_” instead of “+” and “ “ (space))As I said, I think that this behavior is what I expect to happen; Maybe the correct approach here would be to create a scheduler task “sanitize filenames” that should scan the file repositories and correct the wrong filenames… what do you think?
-
Christian Toffolo commented <span data-processor="relativetime" data-value="2022-08-20T08:46:53+00:00" > 08/20/22, 08:46 </span>
Use case: an editor has a “sky+one.jpg” file and wants to replace it. The editor uploads a new file to replace it and TYPO3 informs him that he replaced the file when in fact it didn’t and uploaded the new file. If this file is in a long list of files, the editor probably won’t even notice what happened.
Sure this is a minor bug because it affects a rare use case, but it shouldn’t be treated as expected behavior IMHO.
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2022-08-21T10:19:13+00:00" > 08/21/22, 10:19 </span>
@Christian Toffolo I am saying is that the scenario in which
1. There is already a file on filesystem named
sky+one.jpgthat for some reasons has not been handled by the TYPO3 filename sanification process2. The editor uploads a file using the TYPO3 interface with the same name:
sky+one.jpg.
This time the filename sanification is triggered, so the file is renamedsky_one.jpg3. TYPO3 does not know that there’s already a file named
sky+one.jpg, so this is kept and a new one calledsky_one.jpgis added while the old file is kept.Seems IMHO what should happen and so I think this might be a feature and not a bug… maybe I’m wrong. I would like to know opinions on that.
Why this happens? I guess that the actual file comparison and overwrite process seems to happen after the sanification process.
as proof of this, if I try to upload ANOTHER file (still using TYPO3) still namedsky+one.jpg, the “warning modal” says that there is already a file named sky_one.jpg, not sky+one.jpg!Would it be wise to alter the order of execution of these processes? what would happen in this case
1. there is already
sky+one.jpgon disk
2. editor uploadssky+one.jpgusing TYPO3
3. TYPO3 comparessky+one.jpg(old) tosky+one.jpg(new) -> the filenames are identical -> asks if it should be overwritten -> if answer is YES ->
4. TYPO3 overwrites the file
?? 5. TYPO3 sanitizes the filename tosky_one.jpg
?? 6. TYPO3 deletessky+one.jpgright? Or do you think that in this case the sanification process should be skipped at all?
I also wonder what would happen if for some reason there are on disk files named:
sky+one.jpg sky one.jpg
if you upload
sky+one.jpgwhat would happen? just the first is replaced?I suggested that the anomalous situation about the presence of files not sanitized by TYPO3 could be handled ex post using a scheduled process or something similar.
-
Christian Toffolo commented <span data-processor="relativetime" data-value="2022-08-21T17:25:59+00:00" > 08/21/22, 17:25 </span>
For the use case of this issue, the editor is not simply uploading a file using the TYPO3 interface, the editor is replacing a file using the replace tool of TYPO3.
Maybe you are missing this important difference. -
Xavier Perseguers changed Related to #99893 <span data-processor="relativetime" data-value="2023-02-09T09:50:01+00:00" > 02/09/23, 09:50 </span>
-
Benni Mack changed Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2023-08-02T14:49:45+00:00" > 08/02/23, 14:49 </span>
-
Georg Ringer changed Sprint Focus
On Location SprintNeeds Decision <span data-processor="relativetime" data-value="2024-06-28T08:11:22+00:00" > 06/28/24, 08:11 </span> -
Georg Ringer changed Sprint Focus
Needs Decision<span data-processor="relativetime" data-value="2024-08-03T06:42:10+00:00" > 08/03/24, 06:42 </span> -
Georg Ringer changed Related to #106110 <span data-processor="relativetime" data-value="2025-02-10T21:05:15+00:00" > 02/10/25, 21:05 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96116 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-27T18:07:24+00:00" > 09/27/26, 18:07 </span>
Troubles with URL encoding? A plain + in a URL means space, just like %20.