From c1586ab667e1b6e075538516b21fe8a31855c19e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 20 Oct 2021 12:31:30 +0200 Subject: [PATCH] Remove link from requestURI in acpSessionLog The link has been non-functional since ages, because `hasProtectedURI()` effectively always returned `true`, as the `page` and `form` query parameters are no longer in use. With WoltLab Suite 5.4 the `requestURI` might also contain a request ID and the link length is also limited to 255 characters. All in all it appears that supporting a link within the log is non-trivial, with the benefit being rather small. Resolves #4524 --- wcfsetup/install/files/acp/templates/acpSessionLog.tpl | 2 +- .../session/access/log/ACPSessionAccessLog.class.php | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/acpSessionLog.tpl b/wcfsetup/install/files/acp/templates/acpSessionLog.tpl index 4bf80cc436..bb91145a2d 100644 --- a/wcfsetup/install/files/acp/templates/acpSessionLog.tpl +++ b/wcfsetup/install/files/acp/templates/acpSessionLog.tpl @@ -43,7 +43,7 @@ {$sessionAccessLog->getIpAddress()} {@$sessionAccessLog->time|time} {$sessionAccessLog->className} - {if !$sessionAccessLog->hasProtectedURI()}{$sessionAccessLog->requestURI|truncate:50|tableWordwrap}{else}{$sessionAccessLog->requestURI|truncate:50|tableWordwrap}{/if} + {$sessionAccessLog->requestURI|truncate:50|tableWordwrap} {$sessionAccessLog->requestMethod} {event name='columns'} diff --git a/wcfsetup/install/files/lib/data/acp/session/access/log/ACPSessionAccessLog.class.php b/wcfsetup/install/files/lib/data/acp/session/access/log/ACPSessionAccessLog.class.php index 6856a187ed..c09c09598e 100644 --- a/wcfsetup/install/files/lib/data/acp/session/access/log/ACPSessionAccessLog.class.php +++ b/wcfsetup/install/files/lib/data/acp/session/access/log/ACPSessionAccessLog.class.php @@ -29,17 +29,11 @@ class ACPSessionAccessLog extends DatabaseObject protected static $databaseTableIndexName = 'sessionAccessLogID'; /** - * Returns true if the URI of this log entry is protected. - * - * @return bool + * @since 5.5 This method is long broken. */ public function hasProtectedURI() { - if ($this->requestMethod != 'GET' || !\preg_match('/(\?|&)(page|form)=/', $this->requestURI)) { - return true; - } - - return false; + return true; } /** -- 2.20.1