From: Tim Düsterhus Date: Mon, 14 Dec 2020 16:19:00 +0000 (+0100) Subject: Ensure that the request ID is fully logged in SessionAccessLogListener X-Git-Tag: 5.4.0_Alpha_1~545^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f29a15f679573ac5bba0076bc4fefd52e4ebff6d;p=GitHub%2FWoltLab%2FWCF.git Ensure that the request ID is fully logged in SessionAccessLogListener --- 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.