Skip to content
Snippets Groups Projects
Commit b9b7c6a7 authored by Torben Hansen's avatar Torben Hansen Committed by Georg Ringer
Browse files

[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: default avatarTorben Hansen <derhansen@gmail.com>
Change-Id: I06d8e384c5519975efdc8803c98c0a92a56a7653
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81945


Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarGarvin Hicking <gh@faktor-e.de>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent e9f467d7
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment