From f29a15f679573ac5bba0076bc4fefd52e4ebff6d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 14 Dec 2020 17:19:00 +0100 Subject: [PATCH] Ensure that the request ID is fully logged in SessionAccessLogListener --- .../system/event/listener/SessionAccessLogListener.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/event/listener/SessionAccessLogListener.class.php b/wcfsetup/install/files/lib/system/event/listener/SessionAccessLogListener.class.php index 948862aee7..6d01de4343 100644 --- a/wcfsetup/install/files/lib/system/event/listener/SessionAccessLogListener.class.php +++ b/wcfsetup/install/files/lib/system/event/listener/SessionAccessLogListener.class.php @@ -55,7 +55,9 @@ class SessionAccessLogListener implements IParameterizedEventListener { // Fetch request URI + request ID (if available). $requestURI = UserUtil::getRequestURI(); if ($requestId = \wcf\getRequestId()) { - $requestURI .= ' ('.$requestId.')'; + $requestIdSuffix = ' ('.$requestId.')'; + // Ensure that the request ID fits by truncating the URI. + $requestURI = substr($requestURI, 0, 255 - strlen($requestIdSuffix)).$requestIdSuffix; } // Get controller name + the AJAX action. -- 2.20.1