Skip to content

fix: Do not forward query string to child processes#20

Merged
Soner (shyim) merged 1 commit into
mainfrom
codex/fix-installer-query-string-env
May 21, 2026
Merged

fix: Do not forward query string to child processes#20
Soner (shyim) merged 1 commit into
mainfrom
codex/fix-installer-query-string-env

Conversation

@keulinho

@keulinho Jonas Elfering (keulinho) commented May 20, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Prevent installer-spawned child processes from inheriting QUERY_STRING.
  • Add a regression test that simulates the installer web request environment and verifies QUERY_STRING is not visible in a spawned PHP child process.

Why

Symfony Runtime 7.4.12 changed argv handling for security hardening and clears CLI argv whenever QUERY_STRING is present. The web-installer starts Shopware console commands such as system:update:prepare and system:update:finish from a web request. If QUERY_STRING leaks into the child process environment, those commands are effectively executed as plain bin/console, which exits successfully after printing the command list.

That leaves update finalization incomplete: Composer has updated the Shopware packages, but assets are not installed, so the Administration can render a new Vite asset hash that does not exist in public/bundles. This showed up in shopware/shopware#16910 as acceptance update failures after the Symfony 7.4.12 release.

Validation

  • vendor/bin/phpunit Tests/Services/StreamedCommandResponseGeneratorTest.php
  • composer cs:check
  • vendor/bin/phpstan analyse --memory-limit=1G

@keulinho Jonas Elfering (keulinho) force-pushed the codex/fix-installer-query-string-env branch from 4f02615 to eb31d70 Compare May 20, 2026 14:09
@keulinho Jonas Elfering (keulinho) force-pushed the codex/fix-installer-query-string-env branch from eb31d70 to c7798d8 Compare May 20, 2026 14:24
@keulinho Jonas Elfering (keulinho) changed the title [codex] Do not forward query string to child processes fix: Do not forward query string to child processes May 20, 2026
@keulinho Jonas Elfering (keulinho) marked this pull request as ready for review May 20, 2026 14:28
@shyim Soner (shyim) merged commit fcc5caa into main May 21, 2026
11 checks passed
@shyim Soner (shyim) deleted the codex/fix-installer-query-string-env branch May 21, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants