Project

General

Profile

Bug #90006

Updated by Georg Ringer over 4 years ago

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:* 
 <pre><code class="php"> 

 $requestId = (string)($request->getQueryParams()['id'] ?? ''); 
             if (!empty($requestId) && !empty($page = $this->resolvePageId($requestId))) { 
 </code></pre> 


 

 --------------------------------------------------------------------------------------------------------- 
 *with buxfix is:* 

 <pre><code class="php"> 
 $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] 
                     ); 
                 } 
 </code></pre> 


 

 --------------------------------------------------------------------------------------------------------- 
 *BUT is supposed to be:* 

 <pre><code class="php"> 

 


 $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] 
                     ); 
                 } 

 </code></pre> 



 Because we need to check if is eID script or type (typeNum) page. 

 Regards, 
 Bostjan 

Back