Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review Quiet

88483[BUGFIX] Validate site entry points before saving

Georg Ringer CR 0 V 0 Normal +142 −0 updated 10/10/26, 08:17

Commit message

An entry point of a site, a language or a base variant which cannot
be parsed as URI, e.g. "//https:domain.tld/" or "htttp://domain.tld",
throws an exception whenever the site configuration is loaded. This
takes down frontend, backend and install tool and can only be fixed
on the filesystem.

The site configuration module now validates all entry points before
the configuration is persisted and shows an error instead of saving
a broken configuration.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 4
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/83/88483/4 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/83/88483/4 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Issues 1

Files 3

Review log 1721

  1. Georg Ringer uploaded patch set 1 03/04/25, 16:46

  2. Georg Ringer commented on patch set 1 03/04/25, 16:46

    This change is ready for review.
  3. core-ci voted on patch set 1 V -1 03/04/25, 16:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75109

  4. Georg Ringer uploaded patch set 2 V -1 03/04/25, 16:56

  5. core-ci voted on patch set 2 V +1 03/04/25, 17:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75110

  6. Christian Kuhn commented on patch set 2 03/05/25, 06:23

    SiteConfiguration.php:132

    as usual, we should almost never catch global exceptions since we risk hiding bugs away with this. where exactly does this come from and could this throw a dedicated exception instead, or could this be handled differently?
  7. Garvin Hicking commented on patch set 2 03/05/25, 06:41

    SiteConfiguration.php:132 Reply

    the issue lists a siteconfig URI parsing error which throws this
  8. Georg Ringer commented on patch set 2 03/05/25, 10:16

    @lolli@schwarzbu.ch as it destroys the backend, frontend, install tool and there is no way to restore it without access to the filesystem, this should really be fixed. feel free to come up with a better solution
  9. Benni Mack commented on patch set 2 03/26/25, 13:05

    SiteConfiguration.php:132 Reply Unresolved

    very easy to reproduce. I just use htttp://mydomain.com and my system completely broke. FE, BE. I could imagine we actually throw a more specific "InvalidSiteConfigurationException" exception here and then explain in the BE where to change it.
  10. Benni Mack commented on patch set 2 03/26/25, 13:07

    In addition, this feels like my configuration is "gone" now, with all configuration etc. This will lead to many side effects. I have one more proposal / idea: In the catch() block we need to re-consistute the site but with different URLs, just to ensure that we can edit it. Right now, I cannot edit the configuration (if I don't have access to the file system)
  11. Benni Mack commented on patch set 2 03/26/25, 13:08

    Next appraoch: validate URLs when persisting, so this cannot happen via the UI.
  12. Benni Mack voted on patch set 2 CR -1 03/26/25, 14:21

  13. Stefan Bürk commented on patch set 2 03/26/25, 17:00

    Reply

    Do you mean to validate the stuff within the SiteConfiguratinController->saveAction() before even try to persist it ?
  14. Benni Mack commented on patch set 2 03/26/25, 17:01

    Reply

    correct. I just think this approach here (catching exceptions while reading) is the wrong approach for handling "wrong user input" which is the case how this problem even started.
  15. Stefan Bürk commented on patch set 2 03/26/25, 17:04

    Reply

    Reading the issue, that would be the point I would start also instead of catching the exception. Validate before "proceess and revert on error"
  16. Benni Mack wrote 04/21/26, 15:00

    Removed reviewer Benni Mack with the following votes: * Code-Review-1 by Benni Mack
  17. Benni Mack updated the commit message in patch set 3 V +1 04/22/26, 06:27

  18. core-ci voted on patch set 3 V -1 04/22/26, 06:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100705

  19. Christian Kuhn wrote 06/18/26, 23:04

    Removed cc Christian Kuhn.
  20. Georg Ringer uploaded patch set 4 V -1 10/10/26, 07:55

  21. core-ci voted on patch set 4 V +1 10/10/26, 08:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110766