Project

General

Profile

Actions

Bug #95095

closed

Properties of Extbase OriginalRequest get overwritten on forward

Added by Torben Hansen over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2021-09-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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.

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

This is the state of $currentRequest after controller name, extension name and arguments were changed in $request. So basically we loose important 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


Files

current-request-before.png (88.1 KB) current-request-before.png Torben Hansen, 2021-09-03 08:55
current-request-after.png (85.4 KB) current-request-after.png Torben Hansen, 2021-09-03 08:55

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Feature #94428: Extbase Request implements ServerRequestInterfaceClosed2021-06-29

Actions
Related to TYPO3 Core - Bug #94457: Always override new request arguments when forwardingClosedAlexander Schnitzler2021-07-01

Actions
Related to TYPO3 Core - Bug #95281: Form values from submitted data are missing when validation failsClosed2021-09-20

Actions
Actions #1

Updated by Torben Hansen over 2 years ago

  • Description updated (diff)
Actions #2

Updated by Christian Kuhn over 2 years ago

  • Related to Feature #94428: Extbase Request implements ServerRequestInterface added
Actions #3

Updated by Christian Kuhn over 2 years ago

  • Related to Bug #94457: Always override new request arguments when forwarding added
Actions #4

Updated by Torben Hansen over 2 years ago

  • Related to Bug #95281: Form values from submitted data are missing when validation fails added
Actions #5

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71133

Actions #6

Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71133

Actions #7

Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71133

Actions #8

Updated by Gerrit Code Review over 2 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71133

Actions #9

Updated by Gerrit Code Review over 2 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71133

Actions #10

Updated by Torben Hansen over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF