Skip to content
Snippets Groups Projects
Commit 9d3317e9 authored by Torben Hansen's avatar Torben Hansen Committed by Benni Mack
Browse files

[BUGFIX] Respect sub-requests in HTTP referrer redirect URL evaluation


With #99920 the HTTP referrer evaluation has been extended to not overwrite the evaluated HTTP referrer on failed logins. The fix however broke the HTTP referrer evaluation, when the login plugin is placed on a page which is configured as 403 error page. In this case, the page is called via sub-request and a possible available HTTP referrer from the initiating request is used as redirect url.

This patch extends the HTTP referrer evaluation, so the URL of the
initiating request is used as HTTP referrer variable, if the plugin
is called via sub-request. This ensures, that the user is redirected
to the URL which the 403 error handler intercepted.

In order to do so, the `PageContentErrorHandler` is extended to pass
the original request as request attribute `originalRequest`
to the sub-request. Additionally, the evaluation of the referrer
URL has been moved to `RedirectHandler` and all scenarios have been
covered with tests.

It has to be noted, that in TYPO3 11.5 the fix will only work, if the "Subrequest page errors" feature toggle is enabled.

Resolves: #100715
Releases: main, 12.4, 11.5
Signed-off-by: default avatarTorben Hansen <derhansen@gmail.com>
Change-Id: Ibcfdf5093eac72f1796d15f40ef9426d0597d7f3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79785


Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent cc1909af
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