diff --git a/public/modules/custom/grants_handler/src/EventSubscriber/ForceCompanyAuthorisationSubscriber.php b/public/modules/custom/grants_handler/src/EventSubscriber/ForceCompanyAuthorisationSubscriber.php index f167242ff..216fa6b88 100644 --- a/public/modules/custom/grants_handler/src/EventSubscriber/ForceCompanyAuthorisationSubscriber.php +++ b/public/modules/custom/grants_handler/src/EventSubscriber/ForceCompanyAuthorisationSubscriber.php @@ -77,7 +77,7 @@ public function needsRedirectToLogin(RequestEvent $event): bool { return FALSE; } $requestUri = $event->getRequest()->getRequestUri(); - $urlObject = Url::fromUserInput($requestUri); + $urlObject = Url::fromUserInput(trim(rawurldecode($requestUri))); if ($urlObject->access(User::getAnonymousUser()) === FALSE) { return TRUE; } @@ -107,7 +107,8 @@ public function needsRedirectToMandate(RequestEvent $event): bool { if ($selectedCompany !== NULL) { return FALSE; } - $urlObject = Url::fromUserInput($event->getRequest()->getRequestUri()); + $requestUri = $event->getRequest()->getRequestUri(); + $urlObject = Url::fromUserInput(trim(rawurldecode($requestUri))); $routeName = $urlObject->getRouteName(); $nodeType = '';