From d224cd57eb3ef6a84cd1a41d209a20bfe8093c89 Mon Sep 17 00:00:00 2001
From: Christoph Lehmann <christoph.lehmann@networkteam.com>
Date: Sat, 15 Jun 2024 23:15:14 +0200
Subject: [PATCH] [TASK] Do not log locked backend exceptions

BackendAccessDeniedException is thrown due to inproper client ip.
BackendLockedException is thrown when the backend is locked.

Both cases are desired behaviour, so they should not get logged.

Resolves: #104120
Releases: main, 12.4
Change-Id: If29f4bb58d78a3a3dfcd6d1815ae1b0404311662
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84726
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Torben Hansen <derhansen@gmail.com>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Torben Hansen <derhansen@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
---
 typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php b/typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php
index aedce01bcd84..b79c794a8c56 100644
--- a/typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php
+++ b/typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php
@@ -48,6 +48,9 @@ abstract class AbstractExceptionHandler implements ExceptionHandlerInterface, Si
         1616175847, // Frontend login request is rate limited
         1436717275, // Request with unsupported HTTP method
         1699604555, // Outdated __trustedProperties format in extbase property mapping
+        1517949792, // The IP address of your client does not match the list of allowed IP addresses
+        1517949793, // Backend access by browser is locked for maintenance
+        1517949794, // Backend and Install Tool are locked for maintenance
     ];
 
     public const IGNORED_HMAC_EXCEPTION_CODES = [
-- 
GitLab