Bug #87070

A redirect source called with an invalid pageType leads to error

Added by Daniel Goerz 4 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-12-04
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In the Redirect Middleware the TSFE is partially bootstrapped and $GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_handling'] is set to false for this.

This leads to the following behavior:

  1. Create a redirect for any source, e.g. /foo/bar
  2. Visit /foo/bar/?type=12345678 (note: the typeNum must not be configured)

My first expectation would be that the type is ignored and the redirect is executed.
My second expectation would be that my configured pageUnavailable_handling kicks in for the undefined PageType.

But none of the expectations are met, instead the default TYPO3 error (depending on your displayErrors setting) is displayed

Associated revisions

Revision f6302cac (diff)
Added by Benni Mack 2 months ago

[BUGFIX] Use proper typolink with clean TSFE for redirects

Instead of re-using $GLOBALS['TSFE'] with
an already set $id and $type query
params, a new instance is created depending
on the given site.

Resolves: #87070
Releases: master, 9.5
Change-Id: I65b0b5c7c89db69c99600232927a00575c15d231
Reviewed-on: https://review.typo3.org/59032
Tested-by: TYPO3com <>
Reviewed-by: Daniel Goerz <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>

Revision fe3164d1 (diff)
Added by Benni Mack 2 months ago

[BUGFIX] Use proper typolink with clean TSFE for redirects

Instead of re-using $GLOBALS['TSFE'] with
an already set $id and $type query
params, a new instance is created depending
on the given site.

Resolves: #87070
Releases: master, 9.5
Change-Id: I65b0b5c7c89db69c99600232927a00575c15d231
Reviewed-on: https://review.typo3.org/59424
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

History

#1 Updated by Daniel Goerz 4 months ago

  • Description updated (diff)

#2 Updated by Daniel Goerz 4 months ago

  • Description updated (diff)

#3 Updated by Gerrit Code Review 4 months ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59032

#4 Updated by Gerrit Code Review 3 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59032

#5 Updated by Gerrit Code Review 3 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59032

#6 Updated by Gerrit Code Review 3 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59032

#7 Updated by Gerrit Code Review 2 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59424

#8 Updated by Benni Mack 2 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF