Repository navigation
Fix protected options, sort direction and CI pinning (on #93) - #94
Merged
Merged
Conversation
- Protect the active theme's real theme_mods_{stylesheet} option instead of the
non-existent "theme_mods"; inactive themes' leftovers stay removable.
- Protect salts and keys WordPress stores in the database when wp-config.php
doesn't define them.
- Build the lowercased protected-name map once per request and resolve bulk
collation aliases with a single IN query instead of one query per name.
- Compare the sort direction case-insensitively again, as develop did.
- Pin the new javascript-regressions job's actions to commit SHAs.
- Fetch a full page in the list-response test so fixtures aren't paginated
away on sites with more than 25 matching options.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Test on Playground |
SQLite folds case but not accents, so 'sitéurl' is a distinct, unprotected option there; the test now only expects 403 where the engine maps the name to a protected row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #93, targeting its branch. Fixes the option-action review findings. Touches different code from the tracking follow-up (#95), so both merge into #93 without conflicts. Checked with a local trial merge.
What changes
theme_modswas not a real option name, so Customizer settings could still be deleted. Now the active theme'stheme_mods_{stylesheet}is protected. Inactive themes' leftovers stay removable, since cleaning those up is a legitimate optimizer use.auth_key,auth_salt,secure_auth_*,logged_in_*,nonce_*) are protected. WordPress stores them inwp_optionswhenwp-config.phpdoesn't define them, and deleting them logs every user out.INquery instead of one query per name.develop(DESCwas sorting ascending).javascript-regressionsjob pins its actions to commit SHAs, likedeploy.yml.Verification
tests/hardening.phppasses on a disposable WP 7.1.4 / MySQL 8.0.33 site, as do PHPCS, PHPStan (no plugin errors), parallel-lint and the node tests.nóncé_sált) is refused.%and_names don't widen the match. Theme switches mid-request move the protection. A 400-name preflight runs 1 query.siteurlandwp_user_rolesshow no Delete or checkbox. An inactive theme's mods row could be deleted through the UI after confirmation. Direct REST calls to delete or change protected names return 403. Size sort works both ways from the header click. Console: only a core/browser View TransitionInvalidStateError, which also appears on Settings › General.🤖 Generated with Claude Code