Project

General

Profile

Bug #95095

Updated by Torben Hansen over 2 years ago

Propably with the change #94428 the behavior of a ForwardRequest in Extbase changed. In @TYPO3\CMS\Extbase\Mvc\Dispatcher::buildRequestFromCurrentRequestAndForwardResponse(Request $currentRequest, ForwardResponse $forwardResponse)@ the given @$currentRequest@ is cloned to @$request@ variable and next controller name, extension name and arguments get set for the _cloned request object_ . 

 Since the cloned request object internally holds a _reference_ to original the PSR-7 request, controller name, extension name and arguments actually get overwritten with data from the forwarded request.  

 To visualize this, please see the following screenshots. 

 !current-request-before.png! 

 This is the state right after @$currentRequest@ is cloned to @$request@. Note, that @arguments@ in @ExtbaseRequestParameters@ contains 4 items. 

 !current-request-after.png! 

 This is the state of @$currentRequest@ after controller name, extension name and arguments were changed in @$request@. So basically we loose important every information about the original request here. 

 It seems to me, that this new behavior is unintended any may lead to problems for extension authors relying on data in @OriginalRequest@ 

Back