From 682194d71a5f67fa39d899a9625ba69bb62f9bd8 Mon Sep 17 00:00:00 2001 From: Marcus Schwemer Date: Wed, 11 Sep 2024 11:57:11 +0200 Subject: [PATCH] [SECURITY] Fix IDOR vulnerability in createAction Please see TYPO3 Security Announcement for details. --- Classes/Controller/FormController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/Controller/FormController.php b/Classes/Controller/FormController.php index d1a90d50a..3a61a024d 100644 --- a/Classes/Controller/FormController.php +++ b/Classes/Controller/FormController.php @@ -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();