[FEATURE] Introduce ErrorHandler for 403 errors with redirect option
When TYPO3 is configured to create links to access protected pages using `typolinkLinkAccessRestrictedPages = NONE` (which is default), a 403 response is returned, if the current frontend request does not fulfill configured access permissions. This change introduces a new Site errorHandler, which can be used to handle 403 responses for access restricted pages and which redirects the user to a configured page and adds a configurable GET parameter (`return_url` or `redirect_url`) containing the original URL. The configurable GET parameter can be used by 3rd party extensions to redirect the user back to the original URL after a successful login. The TYPO3 extensions ext:felogin and ext:oidc both support the configurable redirect parameter introduced in the new Site errorHandler feature. Resolves: #101252 Releases: main Signed-off-by:Torben Hansen <derhansen@gmail.com> Change-Id: I06d8e384c5519975efdc8803c98c0a92a56a7653 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81945 Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Garvin Hicking <gh@faktor-e.de> Tested-by:
Garvin Hicking <gh@faktor-e.de> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Tested-by:
Georg Ringer <georg.ringer@gmail.com>
Showing
- typo3/sysext/backend/Configuration/SiteConfiguration/site_errorhandling.php 25 additions, 0 deletions...nd/Configuration/SiteConfiguration/site_errorhandling.php
- typo3/sysext/backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf 15 additions, 0 deletions...rces/Private/Language/locallang_siteconfiguration_tca.xlf
- typo3/sysext/core/Classes/Error/PageErrorHandler/RedirectLoginErrorHandler.php 140 additions, 0 deletions...sses/Error/PageErrorHandler/RedirectLoginErrorHandler.php
- typo3/sysext/core/Classes/Site/Entity/Site.php 4 additions, 0 deletionstypo3/sysext/core/Classes/Site/Entity/Site.php
- typo3/sysext/core/Documentation/Changelog/13.3/Feature-101252-IntroduceErrorHandlerFor403ErrorsWithRedirectOption.rst 60 additions, 0 deletions...2-IntroduceErrorHandlerFor403ErrorsWithRedirectOption.rst
Please register or sign in to comment