#105413Linkvalidator BE-Module wrong permissions for invalid links in page attributes
Description
*Steps to Reproduce*
1. Create a page and disallow editing that page using the Access-Module
2. Create external-url Page below the previously created page and set an invalid url
3. Run the Linkvalidator Task
4. Login as User without Admin privileges
5. Select the external-url page and open the LinkValidator Backend Module
The invalid Link won’t be shown even though the user should have access to the page, because only the parent page is restricted.
Invalid links in Content-Elements are not affected by this issue.
*Technical Analysis*
The Linkvalidator creates an entry for every invalid link. This entry contains a record_pid. For links within Content-Elements this pid is the page containing the Content-Element. For links in page attributes the pid is the parent page of the page with affected attribute.
When fetching the links for the BE-Module the page-table is joined using the record_pid. (see https://github.com/TYPO3/typo3/blob/main/typo3/sysext/linkvalidator/Classes/Repository/BrokenLinkRepository.php#L105)
This means the EditableRestrictions are be applied to the page referenced in record_pid.
Reviews 1
Related issues 1
History 411
-
Sybille Peters changed Related to #105873 <span data-processor="relativetime" data-value="2025-01-01T10:33:01+00:00" > 01/01/25, 10:33 </span>
-
Sybille Peters commented and changed status
NewAccepted <span data-processor="relativetime" data-value="2025-01-01T10:33:40+00:00" > 01/01/25, 10:33 </span> -
Sybille Peters commented <span data-processor="relativetime" data-value="2025-01-01T11:04:48+00:00" > 01/01/25, 11:04 </span>
There are 2 problems:
1. As mentioned above:
> When fetching the links for the BE-Module the page-table is joined using the record_pid. (see https://github.com/TYPO3/typo3/blob/main/typo3/sysext/linkvalidator/Classes/Repository/BrokenLinkRepository.php#L105)
This means the EditableRestrictions are be applied to the page referenced in record_pid.2. The list of pids will not recurse into pages which the user does not have permission to. The page should just not be added to the list of pids, but it should recurse into it:
see PagesRepository::getAllSubpagesForPage
3. BrokenLinkRepository::getAllBrokenLinksForPages
-
Gerrit Code Review pushed patch set 1 for main to change 87610 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2025-01-01T11:41:01+00:00" > 01/01/25, 11:41 </span> -
Sybille Peters changed assigned to Sybille Peters <span data-processor="relativetime" data-value="2025-01-01T11:43:12+00:00" > 01/01/25, 11:43 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 87610 <span data-processor="relativetime" data-value="2025-01-01T12:43:53+00:00" > 01/01/25, 12:43 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 87610 <span data-processor="relativetime" data-value="2025-01-03T12:20:04+00:00" > 01/03/25, 12:20 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 87610 <span data-processor="relativetime" data-value="2025-01-03T15:56:57+00:00" > 01/03/25, 15:56 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 87610 <span data-processor="relativetime" data-value="2026-04-22T06:25:18+00:00" > 04/22/26, 06:25 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 87610 <span data-processor="relativetime" data-value="2026-09-25T18:00:11+00:00" > 09/25/26, 18:00 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 87610 <span data-processor="relativetime" data-value="2026-09-25T18:00:37+00:00" > 09/25/26, 18:00 </span>
Thank you very much for your bug report, steps to reproduce and analysis. I can reproduce this for v14.
The fact that record_pid contains the pid is actually very inconvenient. We really only need the page id. The fact that it is that way makes the every DB query have a separate check for pages and non-pages, see also #105873
I would very much like to change this anyway, but would probably not be able to backport that. So we will try to look into a fix for this bug, regardless.