#108948TemporaryPermissionMutationService::removeSysRedirectPermission() corrupts groupData
Description
Description
The newly introduced TemporaryPermissionMutationService in commit:6a16c5ac313 has a bug in removeSysRedirectPermission() that corrupts $GLOBALS['BE_USER']->groupData['tables_modify'] for non-admin backend users.
Related issues: #95272, #91792
Steps to Reproduce
Log in as a non-admin backend user with pages and tt_content table modify permissions (but not sys_redirect).
Edit a page slug that has child pages (triggers nested slug updates).
Save the page.
Expected Behavior
Child page slugs are updated correctly. The user’s tables_modify permission is correctly restored to pages,tt_content after the redirect is created.
Actual Behavior
The user’s tables_modify is set to the literal string tables_modify instead of the original permission value. Child page slug updates fail silently because the user no longer has pages in their permission list.
Root Cause
removeTableModify() passes the key name 'tables_modify' to removeSysRedirectPermission(), which explodes the key name directly instead of reading the actual value from groupData.
The faulty removeSysRedirectPermission():
// removeTableModify() passes the KEY NAME 'tables_modify':
public function removeTableModify(): void
{
if ($this->containsSysRedirectPermission('tables_modify')) {
$GLOBALS['BE_USER']->groupData['tables_modify'] = $this->removeSysRedirectPermission('tables_modify');
}
}
// removeSysRedirectPermission() explodes the parameter directly:
private function removeSysRedirectPermission(string $permissionString): string
{
$permissions = GeneralUtility::trimExplode(',', $permissionString, true);
// ^^^^^^^^^^^^^^^^^ = 'tables_modify', NOT the actual value
$permissions = array_diff($permissions, ['sys_redirect']);
return implode(',', array_unique($permissions));
// Returns 'tables_modify' — the original permissions are lost
}
Compare with the working addSysRedirectPermission() — same caller pattern, but it correctly dereferences the key:
private function addSysRedirectPermission(string $groupData): string
{
$permissions = GeneralUtility::trimExplode(',', $GLOBALS['BE_USER']->groupData[$groupData], true);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reads actual value
$permissions[] = 'sys_redirect';
return implode(',', array_unique($permissions));
}
So when removeTableModify() calls $this->removeSysRedirectPermission('tables_modify'), it explodes the string 'tables_modify' into ['tables_modify'], removes 'sys_redirect' (not found, no-op), and returns the string 'tables_modify'.
Result: $GLOBALS['BE_USER']->groupData['tables_modify'] = 'tables_modify' — the actual permissions are gone.
The same bug affects removeTableSelect() / tables_select.
Fix
Make removeSysRedirectPermission() consistent with addSysRedirectPermission() by reading from $GLOBALS['BE_USER']->groupData:
private function removeSysRedirectPermission(string $groupData): string
{
$permissions = GeneralUtility::trimExplode(',', $GLOBALS['BE_USER']->groupData[$groupData], true);
$permissions = array_diff($permissions, ['sys_redirect']);
return implode(',', array_unique($permissions));
}
Affected Versions
- TYPO3 13.4.25 (https://review.typo3.org/c/Packages/TYPO3.CMS/+/92752, commit
6a16c5ac313) - TYPO3 14.2.0-dev (https://review.typo3.org/c/Packages/TYPO3.CMS/+/90682, commit
0b738bc93a49)
Impact
- Non-admin users editing page slugs with child pages: child slugs are not updated
- Any extension using DataHandler hooks after the nested slug update sees corrupted permissions
- The corruption persists for the remainder of the request
Reviews 2
Related issues 3
History 79
-
Garvin Hicking changed Related to #91792 <span data-processor="relativetime" data-value="2026-02-11T22:17:10+00:00" > 02/11/26, 22:17 </span>
-
Garvin Hicking changed Related to #95272 <span data-processor="relativetime" data-value="2026-02-11T22:17:32+00:00" > 02/11/26, 22:17 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 92804 status
NewUnder Review <span data-processor="relativetime" data-value="2026-02-11T22:52:40+00:00" > 02/11/26, 22:52 </span> -
Gerrit Code Review pushed patch set 1 for 13.4 to change 92814 <span data-processor="relativetime" data-value="2026-02-12T11:40:05+00:00" > 02/12/26, 11:40 </span>
-
Oliver Bartsch commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-02-12T11:45:07+00:00" > 02/12/26, 11:45 </span> -
Wolfgang Klinger commented <span data-processor="relativetime" data-value="2026-02-17T10:10:42+00:00" > 02/17/26, 10:10 </span>
@ghi I just thought of another problem that could arise here.
What if users don’t have access to the root page (0)? Then they probably won’t be able to create redirects either, right? -
Garvin Hicking commented <span data-processor="relativetime" data-value="2026-02-17T10:22:22+00:00" > 02/17/26, 10:22 </span>
@stfl_wolfgang There are code exemptions in place that will allow this based on permissions so that “should work”(tm).
You could try to verify/check this?
-
Wolfgang Klinger changed Related to #109199 <span data-processor="relativetime" data-value="2026-03-16T10:36:46+00:00" > 03/16/26, 10:36 </span>
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-03-31T08:11:14+00:00" > 03/31/26, 08:11 </span>
Applied in changeset commit:11c1fb2c1aee45920e5ca7ef934d75ff8c392190.