Skip to content

Audit fixes (2026-09) - #6

Merged
luthermonson merged 1 commit into
mainfrom
fix/audit-2026-09
Sep 11, 2026
Merged

luthermonson merged 1 commit into
mainfrom
fix/audit-2026-09

Conversation

@luthermonson

Copy link
Copy Markdown
Contributor

Audited fixes for wordpress-worker (see per-repo details). Config-key migration to [php.worker] (ePHPm #462, the old flat keys are hard startup errors), multipart name[] upload fix where applicable, request-isolation/security fixes for wordpress-worker, and CI (phpunit on PHP 8.2/8.3/8.4). Tests added for every behavioral/security change. wordpress-worker's podman e2e must be re-run manually.

…p.worker] config; CI

SECURITY (P0): reset the current-user identity per request. current_user (and
the legacy user_ID/userdata/... globals) were never cleared, so a logged-in
request pinned its identity onto the resident worker and the next anonymous
visitor was seen as that user. Add them to RESET_GLOBALS so resetRequestGlobals()
unsets them and WordPress re-derives the user from this request's fresh $_COOKIE.
Add RequestIsolationTest proving request N (logged-in) does not leak into N+1.

P1: marshalSuperglobals() only ever ASSIGNED $_SERVER keys, so per-request vars
(HTTP_AUTHORIZATION, CONTENT_TYPE/LENGTH, HTTP_X_*) bled across requests. Track
adapter-set keys and unset the ones a later request does not re-supply. Add an
absent-key bleed test.

- nested $_FILES for multipart name[] uploads (pivoted shape; was last-wins).
  Add splitFieldName()/assignByPath() + multi-file test.
- README: fix the broken (new Worker(...))->run() one-liner (Worker has no run();
  the loop lives in bin/ephpm-wp-worker) and point users at the entry script.
- migrate ephpm.toml + e2e/app.toml + docs to [php.worker] (script/max_requests/
  boot_timeout/populate_superglobals) and [php] concurrency; flat worker_* keys
  are now a hard startup error.
- add GitHub Actions CI (composer install + phpunit on PHP 8.2/8.3/8.4)
@luthermonson
luthermonson merged commit a9a5817 into main Sep 11, 2026
3 checks passed
@luthermonson
luthermonson deleted the fix/audit-2026-09 branch September 11, 2026 06:36
@ephpm

ephpm Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

ePHPm Preview — removed

Preview deployment has been torn down.

@ephpm

ephpm Bot commented Sep 11, 2026

Copy link
Copy Markdown

ePHPm Preview — deployed (health check pending)

URL https://ephpm-wordpress-worker-pr-6.preview.ephpm.dev
Framework PHP
PHP 8.5
Deployed in 91.9s

Preview updates automatically on each push to this PR.

@ephpm
ephpm Bot temporarily deployed to preview-pr-6 September 11, 2026 06:37 Inactive
@ephpm
ephpm Bot temporarily deployed to preview-pr-6 September 11, 2026 06:37 Inactive

This branch was successfully deployed

1 active deployment
preview-pr-6 — b75d2cb7 Deployed Sep 11, 2026 by ephpm[bot]
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.

1 participant