#109210The close button when editing file metadata redirects to the dashboard module for files located in folders containing special characters such as accents
Description
Tested and reproducible on TYPO3 13/14
Steps to reproduce
- Go to file list module
- Create a new folder with name
typô3 - Upload a file in the newly created folder and edit metadata
- Click on close button
Actual results
- File list module is closed and dashboard module is shown
Expected results
- We should go back to the folder list
Additional notes
In typo3/sysext/backend/Classes/Controller/EditDocumentController.php line 221
$this->returnUrl = GeneralUtility::sanitizeLocalUrl($parsedBody['returnUrl'] ?? $queryParams['returnUrl'] ?? '');
returnUrl fails validation and fallback to the first accessible module for user.
In typo3/sysext/core/Classes/Utility/GeneralUtility.php line 2554
if (self::isValidUrl($decodedUrl)) {
if (self::isOnCurrentHost($decodedUrl) && str_starts_with($decodedUrl, self::getIndpEnv('TYPO3_SITE_URL'))) {
$sanitizedUrl = $url;
}
}
$decodedUrl contains decoded accent and fails validation in isValidUrl, I think we should pass $url directly because $url is already parsed in isValidUrl()
PS: there is no problem with TYPO3 v12 as a relative URL is passed and validated with :
str_starts_with($testAbsoluteUrl, self::getIndpEnv('TYPO3_SITE_PATH')) && $decodedUrl[0] === '/' &&
substr($decodedUrl, 0, 2) !== '//')Reviews 1
History 36
-
Garvin Hicking changed category <span data-processor="relativetime" data-value="2026-03-12T05:46:54+00:00" > 03/12/26, 05:46 </span>
-
Andreas Kienast commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2026-03-12T06:13:55+00:00" > 03/12/26, 06:13 </span> -
Roger Rovitch commented <span data-processor="relativetime" data-value="2026-03-12T12:58:02+00:00" > 03/12/26, 12:58 </span>
Hey Andreas !
> Can you please provide more information about your system?- Used OS : Debian 13
- Used environment : LAMP
- PHP version : 8.4.18
- Is `php-intl` installed : yes
I also tested it in a fresh DDEV environment (still on a linux host) with same results, this might be the missing information :
[SYS][UTF8filesystem]is set to trueThanks !
-
Gerrit Code Review pushed patch set 1 for main to change 96516 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2026-10-08T05:35:27+00:00" > 10/08/26, 05:35 </span> -
Gerrit Code Review pushed patch set 2 for main to change 96516 <span data-processor="relativetime" data-value="2026-10-09T18:03:43+00:00" > 10/09/26, 18:03 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 96516 <span data-processor="relativetime" data-value="2026-11-09T20:48:23+00:00" > 11/09/26, 20:48 </span>
Unfortunately, I cannot reproduce the issue. Can you please provide more information about your system?
Kind regards