Skip to content

Commit

Permalink
Merge remote-tracking branch 'security/advisory-fix-MST-33-5.1' into 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
escopecz committed Sep 18, 2024
2 parents aee7bfb + 827a7d0 commit 925aeee
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions app/bundles/UserBundle/Controller/SecurityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,6 @@ public function onRequest(RequestEvent $event): void
*/
public function loginAction(Request $request, AuthenticationUtils $authenticationUtils, IntegrationHelper $integrationHelper, TranslatorInterface $translator): \Symfony\Component\HttpFoundation\Response
{
// A way to keep the upgrade from failing if the session is lost after
// the cache is cleared by upgrade.php
if ($request->cookies->has('mautic_update')) {
$step = $request->cookies->get('mautic_update');
if ('clearCache' === $step) {
// Run migrations
$request->query->set('finalize', 1);

return $this->forward('Mautic\CoreBundle\Controller\AjaxController::updateDatabaseMigrationAction',
[
'request' => $request,
]
);
} elseif ('schemaMigration' === $step) {
// Done so finalize
return $this->forward('Mautic\CoreBundle\Controller\AjaxController::updateFinalizationAction',
[
'request' => $request,
]
);
}

/** @var \Mautic\CoreBundle\Helper\CookieHelper $cookieHelper */
$cookieHelper = $this->factory->getHelper('cookie');
$cookieHelper->deleteCookie('mautic_update');
}

$error = $authenticationUtils->getLastAuthenticationError();

if (null !== $error) {
Expand Down

0 comments on commit 925aeee

Please sign in to comment.