From 0870e1999db206686752fe5da5a2e5c628591671 Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Fri, 28 Aug 2020 15:13:29 +0100 Subject: [PATCH] Issue #3167390 by mbovan, Berdir: ExceptionLoggingSubscriber should not log backtrace string on access denied exceptions --- .../Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php | 1 + 1 file changed, 1 insertion(+) diff --git a/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php index 93bf4961217a..6b4bd1f14e66 100644 --- a/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php @@ -42,6 +42,7 @@ public function on403(ExceptionEvent $event) { // why access was denied. $exception = $event->getThrowable(); $error = Error::decodeException($exception); + unset($error['@backtrace_string']); $error['@uri'] = $event->getRequest()->getRequestUri(); $this->logger->get('access denied')->warning('Path: @uri. %type: @message in %function (line %line of %file).', $error); } -- GitLab