Project

General

Profile

Actions

Bug #101204

open

Error handling for unknown type parameter

Added by Stefan Terborg over 1 year ago. Updated 4 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2023-06-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

I configured error handling in my site config to show page content from the page tree but when I call the page with an unknown type parameter (?type=12345) the default TYPO3 error page is shown.

I looked into the code and found that the TypoScriptFrontendController calls ErrorController->internalErrorAction (line 1860).
The internalErrorAction calls the funtion isPageUnavailableHandlerConfigured (line 52) but this function only checks the devIPmask which is a bit strange according to function name and the required steps to do at this point.

/**
 * Checks whether the devIPMask matches the current visitor's IP address.
 * Note: the name of this method is a misnomer (legacy code),
 *
 * @return bool True if the server error handler should be used.
 */
protected function isPageUnavailableHandlerConfigured(): bool
{
    return !GeneralUtility::cmpIP(GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask']);
}

When I comment out this check the page from the page tree is properly shown.

Could maybe someone look into the code and check the usage of isPageUnavailableHandlerConfigured() at this point? If all is as intended I would like to know how to setup custom error page content for this use case.

Thank you.

Actions #1

Updated by Georg Ringer 5 months ago

  • Sprint Focus set to On Location Sprint
Actions #2

Updated by Garvin Hicking 4 months ago

  • Category set to Site Handling, Site Sets & Routing
Actions

Also available in: Atom PDF