diff --git a/library/Notifications/Daemon/Server.php b/library/Notifications/Daemon/Server.php index 09d44d7c..26d51f4b 100644 --- a/library/Notifications/Daemon/Server.php +++ b/library/Notifications/Daemon/Server.php @@ -406,8 +406,7 @@ protected function authenticate(Connection $connection, array $cookies, array $h if ($browserSession !== null) { if (isset($headers['User-Agent'][0])) { - // limit user-agent to 4k chars - $userAgent = substr(trim($headers['User-Agent'][0]), 0, 4096); + $userAgent = trim($headers['User-Agent'][0]); } else { $userAgent = 'default'; } diff --git a/library/Notifications/ProvidedHook/SessionStorage.php b/library/Notifications/ProvidedHook/SessionStorage.php index 87164fe4..769a4543 100644 --- a/library/Notifications/ProvidedHook/SessionStorage.php +++ b/library/Notifications/ProvidedHook/SessionStorage.php @@ -39,8 +39,7 @@ public function onLogin(User $user): void // user successfully authenticated $rawUserAgent = (new UserAgent())->getAgent(); if ($rawUserAgent) { - // limit user-agent to 4k chars - $userAgent = substr(trim($rawUserAgent), 0, 4096); + $userAgent = trim($rawUserAgent); } else { $userAgent = 'default'; } @@ -124,8 +123,7 @@ public function onLogout(User $user): void $rawUserAgent = (new UserAgent())->getAgent(); if ($rawUserAgent) { - // limit user-agent to 4k chars - $userAgent = substr(trim($rawUserAgent), 0, 4096); + $userAgent = trim($rawUserAgent); } else { $userAgent = 'default'; }