Issue Bug Under Review

#109210The close button when editing file metadata redirects to the dashboard module for files located in folders containing special characters such as accents

Roger Rovitch 03/11/26, 21:26 updated 11/09/26, 20:48

Description

Tested and reproducible on TYPO3 13/14

Steps to reproduce

  1. Go to file list module
  2. Create a new folder with name typô3
  3. Upload a file in the newly created folder and edit metadata
  4. Click on close button

Actual results

  1. File list module is closed and dashboard module is shown

Expected results

  1. 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

  1. Andreas Kienast commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2026-03-12T06:13:55+00:00" > 03/12/26, 06:13 </span>

    Unfortunately, I cannot reproduce the issue. Can you please provide more information about your system?

    • Used OS
    • Used environment (e.g. Docker / ddev)
    • PHP version
    • Is `php-intl` installed?

    Kind regards

  2. 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 true

    Thanks !

  3. Gerrit Code Review pushed patch set 1 for main to change 96516 status Needs Feedback Under Review <span data-processor="relativetime" data-value="2026-10-08T05:35:27+00:00" > 10/08/26, 05:35 </span>