Bug #90006
closed61657: [BUGFIX] Do not fall back to routes on invalid “id” -- missing for typenum and eId
0%
Description
In this bug fix 61657: [BUGFIX] Do not fall back to routes on invalid “id”
for fall back is now error page when we use type (typeNum) pages and id as query parameter ! (for eId script i haven't checked)
---------------------------------------------------------------------------------------------------------
Before fix it was:
$requestId = (string)($request->getQueryParams()['id'] ?? '');
if (!empty($requestId) && !empty($page = $this->resolvePageId($requestId))) {
---------------------------------------------------------------------------------------------------------
with buxfix is:
$requestId = (string)($request->getQueryParams()['id'] ?? '');
if (!empty($requestId)) {
$page = $this->resolvePageId($requestId);
if ($page === null) {
return GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction(
$request,
'The requested page does not exist',
['code' => PageAccessFailureReasons::PAGE_NOT_FOUND]
);
}
---------------------------------------------------------------------------------------------------------
BUT is supposed to be:
$requestId = (string)($request->getQueryParams()['id'] ?? '');
if (!empty($requestId)) {
$requestType = (int)($request->getQueryParams()['type'] ?? null);
if ($requestType !== null && $this->resolvePageId($requestId) === null) {
return GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction(
$request,
'The requested page does not exist',
['code' => PageAccessFailureReasons::PAGE_NOT_FOUND]
);
}
Because we need to check if is eID script or type (typeNum) page.
Regards,
Bostjan
Updated by Bastian Bringenberg almost 5 years ago
- Project changed from 9 to TYPO3 Core
- Category deleted (
Development) - Target version deleted (
unknown) - TYPO3 Version set to 9
Moved to right Project; Guessed TYPO3 Version
Updated by Benni Mack over 4 years ago
- Status changed from New to Needs Feedback
Hmm,
so you're saying that the error page should ONLY be triggered if "id" AND "type" is given? This is not how TYPO3 behaves. if "type" is not given, it falls back to "0".
What is your use-case?
Updated by Riccardo De Contardi almost 4 years ago
- Category set to Site Handling, Site Sets & Routing
Updated by Christian Kuhn almost 3 years ago
- Status changed from Needs Feedback to Closed
hey. i hope it's ok to close here for now: the active use case is unclear and the issue author didn't supply some more information for quite a while. let's restart with a fresh issue if this is still a problem.