Skip to content

Commit

Permalink
[SECURITY] Fix IDOR vulnerability in createAction
Browse files Browse the repository at this point in the history
Please see TYPO3 Security Announcement for details.
  • Loading branch information
mschwemer committed Sep 11, 2024
1 parent 40c6b72 commit 682194d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/Controller/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ public function initializeCreateAction(): void
*/
public function createAction(Mail $mail, string $hash = ''): ResponseInterface
{
if ($mail->getUid() !== null && !HashUtility::isHashValid($hash, $mail)) {
return (new ForwardResponse('form'))->withoutArguments();
}
$event = GeneralUtility::makeInstance(FormControllerCreateActionBeforeRenderViewEvent::class, $mail, $hash, $this);
$this->eventDispatcher->dispatch($event);
$mail = $event->getMail();
Expand Down

0 comments on commit 682194d

Please sign in to comment.