Problem/Motivation

GotoAction::execute() registers a response listener that replaces the response with a redirect. This listener remains registered even after it sets the redirect response.

Persistent application servers such as FrankenPHP worker mode may reuse the event dispatcher across requests. In such a case, later requests receive the same redirect even when the action has not run again.

Steps to reproduce

  1. Configure and execute the Redirect to URL action.
  2. Handle a request through the HTTP kernel and confirm that it receives the configured redirect.
  3. Handle another request using the same kernel and event dispatcher, without executing the action again.
  4. The second response contains the redirect from the first action.

Proposed resolution

Remove the listener after it sets the redirect response.

User interface changes

None.

API changes

None.

Data model changes

None.

AI disclosure: I used AI to help prepare the IS and MR (Astra and Opus 5.5).

Issue fork drupal-3626369

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ptmkenny created an issue. See original summary.

ptmkenny’s picture

Status: Active » Needs review