Project

General

Profile

Actions

Bug #101204

open

Error handling for unknown type parameter

Added by Stefan Terborg 10 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
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:

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.

No data to display

Actions

Also available in: Atom PDF