Issue Bug Resolved

#111502Preview simulation replaces logged-in frontend user who is already member of the simulated group

Benni Mack 11/18/26, 22:25 updated 11/19/26, 10:30

Description

Problem

A backend preview link of an access restricted page carries ADMCMD_simUser, and while a backend user is logged in, the parameter is kept on every link generated in the frontend.

If a frontend user is logged in as well and is already member of the simulated group (directly or through a subgroup), the simulation still takes place: the frontend user ID is replaced by a fake one (PHP_INT_MAX), the usergroup field is overwritten, and the request is flagged as preview. The visitor sees the “Preview” notice and a page rendered for a fake user instead of the page as the real frontend user, e.g. personalized content or felogin show wrong data.

Steps to reproduce

  1. Create a page restricted to frontend group 1, render {context:frontend.user:id} on it.
  2. Log in to the backend, and log in to the frontend with a frontend user who is member of group 1.
  3. Open the page with ?ADMCMD_simUser=1, e.g. via the “View” button of the page module.
  4. The “Preview” notice is shown, and the user ID renders as 9223372036854775807 instead of the uid of the logged-in frontend user.

Cause

TYPO3\CMS\Frontend\Middleware\PreviewSimulator::simulateUserGroup() applies the simulation whenever ADMCMD_simUser is set and does not check whether the current frontend user already has the group.

Related: #104081 shows the same notice for logged-in frontend users without ADMCMD_simUser, caused by the rootline check in the same middleware.

Reviews 3

History 27

  1. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-19T09:40:10+00:00" > 11/19/26, 09:40 </span>

    Applied in changeset commit:358e1f7ce9fa41619fbb6588998e7b45bce5bd6d.

  2. Gerrit Code Review pushed patch set 2 for 14.3 to change 97834 status Resolved Under Review <span data-processor="relativetime" data-value="2026-11-19T09:49:26+00:00" > 11/19/26, 09:49 </span>

  3. Benni Mack commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2026-11-19T10:30:14+00:00" > 11/19/26, 10:30 </span>

    Applied in changeset commit:ba5b22f5ea984ea5b6433ace6eb0cc89a7eaebbd.