Issue Bug Closed

#106605PathUtility::stripPathSitePrefix() cuts provided path to invalid path

Stefan Bürk 04/24/25, 08:47 updated 12/02/25, 14:21

Description

Currently, the PathUtility::stripPathSitePrefix() method cuts the length of the public path value from provided $path even if the path does not start with the public path, which can lead to an invalid and malformed path afterward.
Expected is for path only to be modified when having the public path as prefix (starts with it) and otherwise return the unmodified path.

Reviews 4

History 79

  1. Stefan Bürk commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-04-24T11:50:08+00:00" > 04/24/25, 11:50 </span>

    Applied in changeset commit:e5b30f1a3136a51ded87f65dea088ecb38081b22.

  2. Stefan Bürk commented <span data-processor="relativetime" data-value="2025-05-14T07:31:38+00:00" > 05/14/25, 07:31 </span>

    This change introduced quite some issues, revealed with
    #106690 and the decision has been made to revert it now.

    See: #106690 and
    https://review.typo3.org/c/Packages/TYPO3.CMS/+/89381