Exceptions
Stack Trace
private function throwUnauthorizedException(AuthenticationException $authException): never { $this->logger?->notice(\sprintf('No Authentication entry point configured, returning a %s HTTP response. Configure "entry_point" on the firewall "%s" if you want to modify the response.', Response::HTTP_UNAUTHORIZED, $this->firewallName)); throw new HttpException(Response::HTTP_UNAUTHORIZED, $authException->getMessage(), $authException, [], $authException->getCode()); }}
ExceptionListener->throwUnauthorizedException()
in
vendor/symfony/security-http/Firewall/ExceptionListener.php
(line 215)
}private function startAuthentication(Request $request, AuthenticationException $authException): Response{ if (null === $this->authenticationEntryPoint) { $this->throwUnauthorizedException($authException); } $this->logger?->debug('Calling Authentication entry point.', ['entry_point' => $this->authenticationEntryPoint]); // an entry point that only stands in has no authentication to start, so there is
ExceptionListener->startAuthentication()
in
vendor/symfony/security-http/Firewall/ExceptionListener.php
(line 174)
$insufficientAuthenticationException = new InsufficientAuthenticationException('Full authentication is required to access this resource.', 0, $exception); if (null !== $token) { $insufficientAuthenticationException->setToken($token); } $event->setResponse($this->startAuthentication($event->getRequest(), $insufficientAuthenticationException));} catch (\Exception $e) { $event->setThrowable($e);}return;
ExceptionListener->handleAccessDeniedException()
in
vendor/symfony/security-http/Firewall/ExceptionListener.php
(line 106)
return;}if ($exception instanceof AccessDeniedException) { $this->handleAccessDeniedException($event, $exception); return;}if ($exception instanceof LazyResponseException) {}public function onKernelException(ExceptionEvent $event): void{ foreach ($this->exceptionListeners as $request) { $this->exceptionListeners[$request]->onKernelException($event); }}public function onKernelFinishRequest(FinishRequestEvent $event): void{
Firewall->onKernelException()
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
(line 122)
$this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener);$e = $this->stopwatch->start($this->name, 'event_listener');try { ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);} finally { if ($e->isStarted()) { $e->stop(); }}
WrappedListener->__invoke()
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
(line 115)
foreach ($listeners as $listener) { if ($stoppable && $event->isPropagationStopped()) { break; } $listener($event, $eventName, $this); }} finally { if ($e->isStarted()) { $e->stop(); } * Handles a throwable by trying to convert it to a Response. */private function handleThrowable(\Throwable $e, Request $request, int $type, ?ControllerMetadata $controllerMetadata = null): Response{ $event = new ExceptionEvent($this, $request, $type, $e, isKernelTerminating: $this->terminating, controllerMetadata: $controllerMetadata); $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION); // a listener might have replaced the exception $e = $event->getThrowable(); if (!$event->hasResponse()) { $this->finishRequest($request, $type, $controllerMetadata); throw $e; } return $response = $this->handleThrowable($e, $request, $type, $controllerMetadata);} finally { $this->requestStack->pop(); if ($response instanceof StreamedResponse && $callback = $response->getCallback()) { $requestStack = $this->requestStack; if (!$this->handlingHttpCache) { $this->resetServices = true; } try { return $this->getHttpKernel()->handle($request, $type, $catch); } finally { --$this->requestStackSize; }}) {}public function run(): int{ $response = $this->kernel->handle($this->request); $response->send(false); if (\function_exists('fastcgi_finish_request') && !$this->debug) { fastcgi_finish_request();$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());
require_once('/home/clients/7013e9c520340d452787db41b1ef6905/sites/e-batiment.fji.ch/vendor/autoload_runtime.php')
in
public/index.php
(line 7)
declare(strict_types=1);use App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return static function (array $context): Kernel { $env = $context['APP_ENV'] ?? 'prod'; return new Kernel(is_string($env) ? $env : 'prod', (bool) ($context['APP_DEBUG'] ?? false));
Symfony\Component\HttpKernel\Exception\HttpException:
Full authentication is required to access this resource.
at vendor/symfony/security-http/Firewall/ExceptionListener.php:280
at Symfony\Component\Security\Http\Firewall\ExceptionListener->throwUnauthorizedException()
(vendor/symfony/security-http/Firewall/ExceptionListener.php:215)
at Symfony\Component\Security\Http\Firewall\ExceptionListener->startAuthentication()
(vendor/symfony/security-http/Firewall/ExceptionListener.php:174)
at Symfony\Component\Security\Http\Firewall\ExceptionListener->handleAccessDeniedException()
(vendor/symfony/security-http/Firewall/ExceptionListener.php:106)
at Symfony\Component\Security\Http\Firewall\ExceptionListener->onKernelException()
(vendor/symfony/security-http/Firewall.php:99)
at Symfony\Component\Security\Http\Firewall->onKernelException()
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:122)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:115)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
(vendor/symfony/http-kernel/HttpKernel.php:260)
at Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
(vendor/symfony/http-kernel/HttpKernel.php:95)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:156)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:34)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/home/clients/7013e9c520340d452787db41b1ef6905/sites/e-batiment.fji.ch/vendor/autoload_runtime.php')
(public/index.php:7)Stack Trace
if (!$isFullFledged) { $this->logger?->debug('Access denied, the user is not fully authenticated; redirecting to authentication entry point.', ['exception' => $exception]); try { $insufficientAuthenticationException = new InsufficientAuthenticationException('Full authentication is required to access this resource.', 0, $exception); if (null !== $token) { $insufficientAuthenticationException->setToken($token); } $event->setResponse($this->startAuthentication($event->getRequest(), $insufficientAuthenticationException));
ExceptionListener->handleAccessDeniedException()
in
vendor/symfony/security-http/Firewall/ExceptionListener.php
(line 106)
return;}if ($exception instanceof AccessDeniedException) { $this->handleAccessDeniedException($event, $exception); return;}if ($exception instanceof LazyResponseException) {}public function onKernelException(ExceptionEvent $event): void{ foreach ($this->exceptionListeners as $request) { $this->exceptionListeners[$request]->onKernelException($event); }}public function onKernelFinishRequest(FinishRequestEvent $event): void{
Firewall->onKernelException()
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
(line 122)
$this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener);$e = $this->stopwatch->start($this->name, 'event_listener');try { ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);} finally { if ($e->isStarted()) { $e->stop(); }}
WrappedListener->__invoke()
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
(line 115)
foreach ($listeners as $listener) { if ($stoppable && $event->isPropagationStopped()) { break; } $listener($event, $eventName, $this); }} finally { if ($e->isStarted()) { $e->stop(); } * Handles a throwable by trying to convert it to a Response. */private function handleThrowable(\Throwable $e, Request $request, int $type, ?ControllerMetadata $controllerMetadata = null): Response{ $event = new ExceptionEvent($this, $request, $type, $e, isKernelTerminating: $this->terminating, controllerMetadata: $controllerMetadata); $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION); // a listener might have replaced the exception $e = $event->getThrowable(); if (!$event->hasResponse()) { $this->finishRequest($request, $type, $controllerMetadata); throw $e; } return $response = $this->handleThrowable($e, $request, $type, $controllerMetadata);} finally { $this->requestStack->pop(); if ($response instanceof StreamedResponse && $callback = $response->getCallback()) { $requestStack = $this->requestStack; if (!$this->handlingHttpCache) { $this->resetServices = true; } try { return $this->getHttpKernel()->handle($request, $type, $catch); } finally { --$this->requestStackSize; }}) {}public function run(): int{ $response = $this->kernel->handle($this->request); $response->send(false); if (\function_exists('fastcgi_finish_request') && !$this->debug) { fastcgi_finish_request();$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());
require_once('/home/clients/7013e9c520340d452787db41b1ef6905/sites/e-batiment.fji.ch/vendor/autoload_runtime.php')
in
public/index.php
(line 7)
declare(strict_types=1);use App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return static function (array $context): Kernel { $env = $context['APP_ENV'] ?? 'prod'; return new Kernel(is_string($env) ? $env : 'prod', (bool) ($context['APP_DEBUG'] ?? false));
Symfony\Component\Security\Core\Exception\InsufficientAuthenticationException:
Full authentication is required to access this resource.
at vendor/symfony/security-http/Firewall/ExceptionListener.php:169
at Symfony\Component\Security\Http\Firewall\ExceptionListener->handleAccessDeniedException()
(vendor/symfony/security-http/Firewall/ExceptionListener.php:106)
at Symfony\Component\Security\Http\Firewall\ExceptionListener->onKernelException()
(vendor/symfony/security-http/Firewall.php:99)
at Symfony\Component\Security\Http\Firewall->onKernelException()
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:122)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:115)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
(vendor/symfony/http-kernel/HttpKernel.php:260)
at Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
(vendor/symfony/http-kernel/HttpKernel.php:95)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:156)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:34)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/home/clients/7013e9c520340d452787db41b1ef6905/sites/e-batiment.fji.ch/vendor/autoload_runtime.php')
(public/index.php:7)Stack Trace
// within the "authenticate" stage.$currentToken = $this->tokenStorage->getToken();if (!$currentToken instanceof TwoFactorTokenInterface) { // This should only happen when the check path is called outside of a 2fa process // access_control can't handle this, as it's called after the authenticator throw new AccessDeniedException('User is not in a two-factor authentication process.');}$this->dispatchTwoFactorAuthenticationEvent(TwoFactorAuthenticationEvents::ATTEMPT, $request, $currentToken);$credentials = new TwoFactorCodeCredentials($currentToken, $this->twoFactorFirewallConfig->getAuthCodeFromRequest($request));
TwoFactorAuthenticator->authenticate()
in
vendor/symfony/security-http/Authenticator/Debug/TraceableAuthenticator.php
(line 82)
public function authenticate(Request $request): Passport{ $startTime = microtime(true); try { $this->passport = $this->authenticator->authenticate($request); } finally { $this->duration = microtime(true) - $startTime; } return $this->passport;
TraceableAuthenticator->authenticate()
in
vendor/symfony/security-http/Authentication/AuthenticatorManager.php
(line 173)
$passport = null;$previousToken = $this->tokenStorage->getToken();try { // get the passport from the Authenticator $passport = $authenticator->authenticate($request); // check the passport (e.g. password checking) $event = new CheckPassportEvent($authenticator, $passport); $this->eventDispatcher->dispatch($event);
AuthenticatorManager->executeAuthenticator()
in
vendor/symfony/security-http/Authentication/AuthenticatorManager.php
(line 155)
$this->logger?->debug('Skipping the "{authenticator}" authenticator as it did not support the request.', ['authenticator' => ($authenticator instanceof TraceableAuthenticator ? $authenticator->getAuthenticator() : $authenticator)::class]); continue;}$response = $this->executeAuthenticator($authenticator, $request);if (null !== $response) { $this->logger?->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', ['authenticator' => ($authenticator instanceof TraceableAuthenticator ? $authenticator->getAuthenticator() : $authenticator)::class]); return $response;}
AuthenticatorManager->executeAuthenticators()
in
vendor/symfony/security-http/Authentication/AuthenticatorManager.php
(line 137)
if (!$authenticators) { return null; } return $this->executeAuthenticators($authenticators, $request);}/** * @param AuthenticatorInterface[] $authenticators */
AuthenticatorManager->authenticateRequest()
in
vendor/symfony/security-http/Firewall/AuthenticatorManagerListener.php
(line 38)
}public function authenticate(RequestEvent $event): void{ $request = $event->getRequest(); $response = $this->authenticatorManager->authenticateRequest($request); if (null === $response) { return; } $event->setResponse($response);
AuthenticatorManagerListener->authenticate()
in
vendor/symfony/security-http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php
(line 58)
return $supports;}public function authenticate(RequestEvent $event): void{ $this->authenticationManagerListener->authenticate($event);}public function getAuthenticatorManagerListener(): AuthenticatorManagerListener{ return $this->authenticationManagerListener;
TraceableAuthenticatorManagerListener->authenticate()
in
vendor/symfony/security-bundle/Debug/WrappedLazyListener.php
(line 52)
public function authenticate(RequestEvent $event): void{ $startTime = microtime(true); try { $this->listener->authenticate($event); } catch (LazyResponseException $e) { $this->response = $e->getResponse(); throw $e; } finally {
WrappedLazyListener->authenticate()
in
vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php
(line 93)
foreach ($requestListeners as $listener) { if (false === $listener->supports($event->getRequest())) { continue; } $listener->authenticate($event); if ($event->hasResponse()) { break; }} if (null !== $logoutListener) { yield $logoutListener; } }; $this->callListeners($event, $authenticationListeners());}public function onKernelException(ExceptionEvent $event): void{ foreach ($this->exceptionListeners as $request) {$this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener);$e = $this->stopwatch->start($this->name, 'event_listener');try { ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);} finally { if ($e->isStarted()) { $e->stop(); }}
WrappedListener->__invoke()
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
(line 115)
foreach ($listeners as $listener) { if ($stoppable && $event->isPropagationStopped()) { break; } $listener($event, $eventName, $this); }} finally { if ($e->isStarted()) { $e->stop(); } */private function handleRaw(Request $request, int $type = self::MAIN_REQUEST, ?ControllerMetadata &$controllerMetadata = null): Response{ // request $event = new RequestEvent($this, $request, $type); $this->dispatcher->dispatch($event, KernelEvents::REQUEST); if ($event->hasResponse()) { return $this->filterResponse($event->getResponse(), $request, $type); }$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try { return $response = $this->handleRaw($request, $type, $controllerMetadata);} catch (\Throwable $e) { if ($e instanceof \Error && !$this->handleAllThrowables) { throw $e; } if (!$this->handlingHttpCache) { $this->resetServices = true; } try { return $this->getHttpKernel()->handle($request, $type, $catch); } finally { --$this->requestStackSize; }}) {}public function run(): int{ $response = $this->kernel->handle($this->request); $response->send(false); if (\function_exists('fastcgi_finish_request') && !$this->debug) { fastcgi_finish_request();$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());
require_once('/home/clients/7013e9c520340d452787db41b1ef6905/sites/e-batiment.fji.ch/vendor/autoload_runtime.php')
in
public/index.php
(line 7)
declare(strict_types=1);use App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return static function (array $context): Kernel { $env = $context['APP_ENV'] ?? 'prod'; return new Kernel(is_string($env) ? $env : 'prod', (bool) ($context['APP_DEBUG'] ?? false));
Symfony\Component\Security\Core\Exception\AccessDeniedException:
User is not in a two-factor authentication process.
at vendor/scheb/2fa-bundle/Security/Http/Authenticator/TwoFactorAuthenticator.php:79
at Scheb\TwoFactorBundle\Security\Http\Authenticator\TwoFactorAuthenticator->authenticate()
(vendor/symfony/security-http/Authenticator/Debug/TraceableAuthenticator.php:82)
at Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticator->authenticate()
(vendor/symfony/security-http/Authentication/AuthenticatorManager.php:173)
at Symfony\Component\Security\Http\Authentication\AuthenticatorManager->executeAuthenticator()
(vendor/symfony/security-http/Authentication/AuthenticatorManager.php:155)
at Symfony\Component\Security\Http\Authentication\AuthenticatorManager->executeAuthenticators()
(vendor/symfony/security-http/Authentication/AuthenticatorManager.php:137)
at Symfony\Component\Security\Http\Authentication\AuthenticatorManager->authenticateRequest()
(vendor/symfony/security-http/Firewall/AuthenticatorManagerListener.php:38)
at Symfony\Component\Security\Http\Firewall\AuthenticatorManagerListener->authenticate()
(vendor/symfony/security-http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php:58)
at Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticatorManagerListener->authenticate()
(vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:52)
at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate()
(vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:93)
at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners()
(vendor/symfony/security-http/Firewall.php:93)
at Symfony\Component\Security\Http\Firewall->onKernelRequest()
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:122)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:115)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
(vendor/symfony/http-kernel/HttpKernel.php:174)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:80)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:156)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:34)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/home/clients/7013e9c520340d452787db41b1ef6905/sites/e-batiment.fji.ch/vendor/autoload_runtime.php')
(public/index.php:7)