Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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: Torben Hansen <derhansen@gmail.com> Change-Id: Ibcfdf5093eac72f1796d15f40ef9426d0597d7f3 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79785 Tested-by: Benni Mack <benni@typo3.org> Tested-by: core-ci <typo3@b13.com> Reviewed-by: Benni Mack <benni@typo3.org>
- Loading branch information
Showing
4 changed files
with
122 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters