Skip to content

Commit 0b02f89

Browse files
dknaussclaude
andcommitted
release: v2.10.2 β€” multisite uninstall fixes, Psalm integration, test gap closure
Bug fixes: - Multisite uninstall: MU-plugin shim and user meta no longer orphaned when network-activated plugin is uninstalled - Uninstall: wp_sudo_version option now properly deleted - Admin::get() TypeError on PHP 8.2+ with corrupted settings - Gate::matches_rest() crash on invalid third-party regex patterns Infrastructure: - Psalm 6.15.1 + Shepherd type coverage (96.7%) - Codecov integration - 16 new unit tests (428 total, 1043 assertions) - Dependency bumps, CodeQL, Dependabot Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 017606b commit 0b02f89

7 files changed

Lines changed: 4342 additions & 948 deletions

File tree

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Changelog
22

3+
## 2.10.2
4+
5+
- **Fix: multisite uninstall orphaned MU-plugin shim and user meta** β€” when a network-activated plugin was uninstalled, the early-return path skipped `wp_sudo_cleanup_mu_shim()` and `wp_sudo_cleanup_user_meta()`, leaving the shim file and session metadata in the database after plugin deletion. Multisite uninstall now unconditionally cleans all sites and all network-wide data.
6+
- **Fix: `wp_sudo_version` option not deleted on uninstall** β€” `wp_sudo_cleanup_site()` deleted four options but missed `wp_sudo_version`, leaving an orphan row. Also added the missing `delete_site_option( 'wp_sudo_role_version' )` to the multisite network cleanup path.
7+
- **Fix: `Admin::get()` TypeError on PHP 8.2+ with corrupted settings** β€” `get_option()` returning `false` (from corrupted serialized data) was assigned to a `?array` typed property, causing a TypeError. Now validates the return with `is_array()` and falls back to defaults.
8+
- **Fix: `Gate::matches_rest()` crash on invalid third-party regex** β€” third-party filters on `wp_sudo_gated_actions` could inject rules with malformed regex patterns, causing `preg_match()` warnings. New `safe_preg_match()` wrapper catches the warning and fails closed (rule does not match).
9+
- **Psalm 6.15.1 static analysis** β€” added alongside PHPStan for dual static analysis. Psalm surfaced the `absint()` β†’ `(int)` cast fix in Admin and the `wp_safe_redirect()` fallback in Gate (both shipped in v2.10.0 but caught by Psalm). Type coverage published to Shepherd.dev on default-branch pushes.
10+
- **Codecov integration** β€” unit test coverage uploaded to Codecov on CI runs.
11+
- **16 new unit tests** closing gaps in CLI cron-policy enforcement, network activation lifecycle, network admin settings save, admin bar deactivation handler, transient storage failures, cookie/token edge cases, and 2FA provider availability.
12+
- **Dependency bumps** β€” PHPStan 2.1.40, Yoast PHPUnit Polyfills 4.0.0, actions/checkout v6, actions/cache v5, actions/upload-artifact v7, actions/github-script v8.
13+
- **CodeQL and Dependabot** β€” CodeQL JavaScript security scanning enabled; Dependabot version updates for Composer and GitHub Actions.
14+
- **428 unit tests, 1043 assertions. 92 integration tests in CI.**
15+
16+
## 2.10.1
17+
18+
- **Fix: accessibility audit follow-up** β€” admin bar countdown polish, docs alignment.
19+
- **397 unit tests, 944 assertions. 92 integration tests in CI.**
20+
21+
## 2.10.0
22+
23+
- **Feature: WebAuthn gating bridge** β€” gates WebAuthn key registration and deletion via `wp_sudo_gated_actions` filter when the Two Factor WebAuthn plugin is active.
24+
- **Fix: WP 7.0 notice CSS** β€” corrected admin notice styling for WordPress 7.0 compatibility.
25+
- **Fix: MU-plugin shim respects deactivation** β€” the loader now checks `active_plugins` / `active_sitewide_plugins` before loading the plugin; inert when deactivated.
26+
- **Fix: localize app-password JS** β€” moved inline script to localized data; paginate stale sessions in Site Health; fix return_url handling.
27+
- **Fix: clamp 2FA window filter** β€” `wp_sudo_two_factor_window` filter output clamped to documented 1–15 minute bounds.
28+
- **REST `_wpnonce` fallback** β€” Gate accepts `_wpnonce` query parameter for REST authentication when cookie nonce header is absent.
29+
- **Exit path integration tests** β€” new test suite for security-critical exit paths (REST 403, AJAX 403, admin redirect, challenge auth, grace window).
30+
- **PCOV coverage CI job** β€” unit test coverage generation added to CI pipeline.
31+
- **Docs: NIST SP 800-63B terminology alignment** β€” reauthentication language updated throughout.
32+
- **397 unit tests, 944 assertions. 92 integration tests in CI.**
33+
334
## 2.9.2
435

536
- **Fix: 2FA help text corrected** β€” `includes/class-admin.php` displayed "The default 2FA window is 10 minutes" but the code default (set in v2.4.0) is `5 * MINUTE_IN_SECONDS`. Help text now reads "5 minutes". The sudo session countdown (admin bar) is a separate, unrelated timer that remains at 15 minutes.

0 commit comments

Comments
Β (0)