Commit 5b3af51f authored by Stephan Großberndt's avatar Stephan Großberndt Committed by Stefan Bürk
Browse files

[BUGFIX] Avoid postgresql error previewing a fe_group-protected page

Avoid a postgresql error when previewing a page from the backend which
has an access protection by a fe_group due to PreviewSimulator faking
a fe_user with uid PHP_INT_MAX and sql failure to update the is_online
status of this fake user in PostgreSQL as column fe_users.uid is of type
integer and thus has max value of 2147483647 instead of PHP_INT_MAX.

Releases: main, 11.5, 10.4
Resolves: #97564
Change-Id: I16c866c368a9b3f5ac6bdfacf2c6660a7046df5a

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Nikita Hovratov's avatarNikita Hovratov <>
Tested-by: Stefan Bürk's avatarStefan Bürk <>
Reviewed-by: Oliver Klee's avatarOliver Klee <>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <>
Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <>
parent f9f3dcbf
......@@ -513,7 +513,9 @@ class FrontendUserAuthentication extends AbstractUserAuthentication
public function updateOnlineTimestamp()
if (!is_array($this->user) || !($this->user['uid'] ?? 0)
if (!is_array($this->user)
|| !($this->user['uid'] ?? 0)
|| $this->user['uid'] === PHP_INT_MAX // Simulated preview user (flagged with PHP_INT_MAX uid)
|| ($this->user['is_online'] ?? 0) >= $GLOBALS['EXEC_TIME'] - 60) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment