Bug #90006

61657: [BUGFIX] Do not fall back to routes on invalid “id” -- missing for typenum and eId

Added by Bostjan Kristl about 1 month ago. Updated 26 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-12-23
Due date:
% Done:

0%

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

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

History

#1 Updated by Bostjan Kristl about 1 month ago

  • Description updated (diff)

#2 Updated by Bastian Bringenberg 26 days ago

  • Project changed from forge.typo3.org to TYPO3 Core
  • Category deleted (Development)
  • Target version deleted (unknown)
  • TYPO3 Version set to 9

Moved to right Project; Guessed TYPO3 Version

Also available in: Atom PDF