#111421WebhookRepository runtime cache ignores the default restrictions flag
Description
TYPO3\CMS\Webhooks\Repository\WebhookRepository::findAll() caches its result in cache.runtime under the fixed identifier webhooks_all. The query behind it depends on $applyDefaultRestrictions: without the flag only deleted records are excluded, with it disabled and start/end time limited records are excluded as well. The flag is not part of the cache identifier.
So whichever caller runs first in a process decides the result for every later caller:
- Unrestricted first (e.g. code listing all webhooks), then
WebhookMessageHandler(which setssetApplyDefaultRestrictions(true)): the handler receives disabled and time-limited webhooks and sends requests to them. - Restricted first, then an unrestricted caller: the caller misses disabled records.
The flag itself is mutable state on a shared service. WebhookMessageHandler sets it to true and never resets it, so later calls of getQueryBuilder() / findByDemand() in the same process (e.g. ManagementController) run with default restrictions as well.
In long-running processes (messenger:consume worker) the runtime cache may also keep the webhook list across messages, so webhooks created, disabled or changed after the first message are not seen until the worker restarts. This needs to be verified.
Expected
- The result of
findAll()depends only on the restriction setting of the call, not on earlier callers. - Whether disabled webhooks are delivered must not depend on what ran before in the same process. This matters for #111024 (targeted webhook messages), which promises delivery to active webhooks only.
Reviews 2
History 15
-
Gerrit Code Review pushed patch set 1 for main to change 97576 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-12T10:56:22+00:00" > 11/12/26, 10:56 </span> -
Gerrit Code Review pushed patch set 2 for main to change 97576 <span data-processor="relativetime" data-value="2026-11-12T13:59:28+00:00" > 11/12/26, 13:59 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 97604 <span data-processor="relativetime" data-value="2026-11-13T10:10:58+00:00" > 11/13/26, 10:10 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 97604 <span data-processor="relativetime" data-value="2026-11-13T11:50:13+00:00" > 11/13/26, 11:50 </span>
-
Josua Vogel commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-13T14:25:12+00:00" > 11/13/26, 14:25 </span>
Applied in changeset commit:2992028290c71b6fe4e9241cf360f5c89967df94.