Exceptions
Exceptions 2
Symfony\Component\HttpKernel\Exception\ AccessDeniedHttpException
Show exception properties
Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException {#564 -statusCode: 403 -headers: [] }
}}private function handleLogoutException(ExceptionEvent $event, LogoutException $exception): void{$event->setThrowable(new AccessDeniedHttpException($exception->getMessage(), $exception));$this->logger?->info('A LogoutException was thrown; wrapping with AccessDeniedHttpException', ['exception' => $exception]);}private function startAuthentication(Request $request, AuthenticationException $authException): Response
in
vendor/symfony/security-http/Firewall/ExceptionListener.php
->
handleLogoutException
(line 105)
return;}if ($exception instanceof LogoutException) {$this->handleLogoutException($event, $exception);return;}} while (null !== $exception = $exception->getPrevious());}
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
->
onKernelException
(line 115)
$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();}}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
__invoke
(line 206)
foreach ($listeners as $listener) {if ($stoppable && $event->isPropagationStopped()) {break;}$listener($event, $eventName, $this);}}/*** Sorts the internal list of listeners for the given event by priority.
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 56)
} else {$listeners = $this->getListeners($eventName);}if ($listeners) {$this->callListeners($listeners, $eventName, $event);}return $event;}
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
->
dispatch
(line 129)
try {$this->beforeDispatch($eventName, $event);try {$e = $this->stopwatch->start($eventName, 'section');try {$this->dispatcher->dispatch($event, $eventName);} finally {if ($e->isStarted()) {$e->stop();}}
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 241)
* Handles a throwable by trying to convert it to a Response.*/private function handleThrowable(\Throwable $e, Request $request, int $type): Response{$event = new ExceptionEvent($this, $request, $type, $e, isKernelTerminating: $this->terminating);$this->dispatcher->dispatch($event, KernelEvents::EXCEPTION);// a listener might have replaced the exception$e = $event->getThrowable();if (!$event->hasResponse()) {
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleThrowable
(line 91)
$this->finishRequest($request, $type);throw $e;}return $response = $this->handleThrowable($e, $request, $type);} finally {$this->requestStack->pop();if ($response instanceof StreamedResponse && $callback = $response->getCallback()) {$requestStack = $this->requestStack;
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 193)
if (!$this->handlingHttpCache) {$this->resetServices = true;}try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
) {}public function run(): int{$response = $this->kernel->handle($this->request);if (Kernel::VERSION_ID >= 60400) {$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in
vendor/autoload_runtime.php
->
run
(line 32)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return static function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Symfony\Component\Security\Core\Exception\ LogoutException
if (null !== $this->csrfTokenManager) {$csrfToken = ParameterBagUtils::getRequestParameterValue($request, $this->options['csrf_parameter'], $request->request->all());if (!\is_string($csrfToken) || false === $this->csrfTokenManager->isTokenValid(new CsrfToken($this->options['csrf_token_id'], $csrfToken))) {throw new LogoutException('Invalid CSRF token.');}}$logoutEvent = new LogoutEvent($request, $this->tokenStorage->getToken());$this->eventDispatcher->dispatch($logoutEvent);
in
vendor/symfony/security-bundle/Debug/WrappedLazyListener.php
->
authenticate
(line 46)
public function authenticate(RequestEvent $event): void{$startTime = microtime(true);try {$this->listener->authenticate($event);} catch (LazyResponseException $e) {$this->response = $e->getResponse();throw $e;} finally {
in
vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php
->
authenticate
(line 94)
foreach ($requestListeners as $listener) {if (!$listener instanceof FirewallListenerInterface) {$listener($event);} elseif (false !== $listener->supports($event->getRequest())) {$listener->authenticate($event);}if ($event->hasResponse()) {break;}
in
vendor/symfony/security-http/Firewall.php
->
callListeners
(line 93)
if (null !== $logoutListener) {yield $logoutListener;}};$this->callListeners($event, $authenticationListeners());}/*** @return void*/
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
->
onKernelRequest
(line 115)
$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();}}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
__invoke
(line 206)
foreach ($listeners as $listener) {if ($stoppable && $event->isPropagationStopped()) {break;}$listener($event, $eventName, $this);}}/*** Sorts the internal list of listeners for the given event by priority.
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 56)
} else {$listeners = $this->getListeners($eventName);}if ($listeners) {$this->callListeners($listeners, $eventName, $event);}return $event;}
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
->
dispatch
(line 129)
try {$this->beforeDispatch($eventName, $event);try {$e = $this->stopwatch->start($eventName, 'section');try {$this->dispatcher->dispatch($event, $eventName);} finally {if ($e->isStarted()) {$e->stop();}}
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 159)
*/private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response{// request$event = new RequestEvent($this, $request, $type);$this->dispatcher->dispatch($event, KernelEvents::REQUEST);if ($event->hasResponse()) {return $this->filterResponse($event->getResponse(), $request, $type);}
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 76)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 193)
if (!$this->handlingHttpCache) {$this->resetServices = true;}try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
) {}public function run(): int{$response = $this->kernel->handle($this->request);if (Kernel::VERSION_ID >= 60400) {$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in
vendor/autoload_runtime.php
->
run
(line 32)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return static function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
| Level | Channel | Message |
|---|---|---|
| DEBUG 00:06:35 | php |
Warning: Zend OPcache API is restricted by "restrict_api" configuration directive {
"exception": {
"severity": 2,
"file": "/home/cjiwqkc/jw.gd/vendor/symfony/error-handler/DebugClassLoader.php",
"line": 318,
"trace": [
{
"file": "/home/cjiwqkc/jw.gd/vendor/doctrine/doctrine-bundle/src/DoctrineBundle.php",
"line": 136,
"function": "loadClass",
"class": "Symfony\\Component\\ErrorHandler\\DebugClassLoader",
"type": "->"
}
],
"count": 26
}
}
|
| INFO 00:06:35 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "dba3aa"
},
"request_uri": "https://www.jw.gd/public/_profiler/dba3aa?panel=exception&type=request",
"method": "GET"
}
|
Stack Traces 2
|
[2/2]
AccessDeniedHttpException
|
|---|
Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException:
Invalid CSRF token.
at vendor/symfony/security-http/Firewall/ExceptionListener.php:171
at Symfony\Component\Security\Http\Firewall\ExceptionListener->handleLogoutException(object(ExceptionEvent), object(LogoutException))
(vendor/symfony/security-http/Firewall/ExceptionListener.php:105)
at Symfony\Component\Security\Http\Firewall\ExceptionListener->onKernelException(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/EventDispatcher.php:206)
at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.exception', object(ExceptionEvent))
(vendor/symfony/event-dispatcher/EventDispatcher.php:56)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception')
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:129)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception')
(vendor/symfony/http-kernel/HttpKernel.php:241)
at Symfony\Component\HttpKernel\HttpKernel->handleThrowable(object(LogoutException), object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:91)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:193)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/home/cjiwqkc/jw.gd/vendor/autoload_runtime.php')
(public/index.php:5)
|
|
[1/2]
LogoutException
|
|---|
Symfony\Component\Security\Core\Exception\LogoutException:
Invalid CSRF token.
at vendor/symfony/security-http/Firewall/LogoutListener.php:75
at Symfony\Component\Security\Http\Firewall\LogoutListener->authenticate(object(RequestEvent))
(vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:46)
at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate(object(RequestEvent))
(vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:94)
at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners(object(RequestEvent), object(Generator))
(vendor/symfony/security-http/Firewall.php:93)
at Symfony\Component\Security\Http\Firewall->onKernelRequest(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/EventDispatcher.php:206)
at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(RequestEvent))
(vendor/symfony/event-dispatcher/EventDispatcher.php:56)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:129)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
(vendor/symfony/http-kernel/HttpKernel.php:159)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:193)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/home/cjiwqkc/jw.gd/vendor/autoload_runtime.php')
(public/index.php:5)
|