Skip to content

Commit

Permalink
[BUGFIX] Set applicationType in ResetPasswordCommand
Browse files Browse the repository at this point in the history
Since #92951 the PSR-7 request used in Core contains the
`applicationType` attribute. Because ResetPasswordCommand
creates its own "fake" request object, the new attribute must
also be added there, to prevent a RuntimeException.

Resolves: #93111
Releases: master
Change-Id: I29c61edbdb0f8047d3e41ee2bb07a9551f2a2418
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67186
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
o-ba authored and bmack committed Dec 18, 2020
1 parent 22b32df commit 41ccc6b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use TYPO3\CMS\Backend\Authentication\PasswordReset;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Core\SystemEnvironmentBuilder;
use TYPO3\CMS\Core\Http\NormalizedParams;
use TYPO3\CMS\Core\Http\ServerRequest;
use TYPO3\CMS\Core\Http\Uri;
Expand Down Expand Up @@ -139,7 +140,9 @@ protected function createFakeWebRequest(string $backendUrl): ServerRequestInterf
Environment::isWindows() ? 'WINDOWS' : 'UNIX'
);

return $request->withAttribute('normalizedParams', $normalizedParams);
return $request
->withAttribute('normalizedParams', $normalizedParams)
->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_BE);
}

/**
Expand Down

0 comments on commit 41ccc6b

Please sign in to comment.