Skip to content

Release 2.6.6 security hotfix - #119

Merged
danieliser merged 6 commits into
masterfrom
agent/rest-settings-hotfix-2.6.6
Aug 13, 2026
Merged

danieliser merged 6 commits into
masterfrom
agent/rest-settings-hotfix-2.6.6

Conversation

@danieliser

@danieliser danieliser commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Restrict GET /content-control/v2/settings to users with the existing settings-administration capabilities.
  • Bump the plugin patch version from 2.6.5 to 2.6.6 across the plugin header/config, package metadata, lockfile, and WordPress.org stable tag.
  • Add the dated 2.6.6 security entry to both changelogs.

Root cause and impact

The read route used __return_true because it was read-only, but its response contains global plugin settings. That exposed those settings to unauthenticated REST requests. The read route now reuses the same permission callback as the write route, preserving access for users with manage_options or activate_plugins.

Validation

  • PHP syntax check passed.
  • WordPress Coding Standards check passed for the changed PHP files.
  • Isolated REST route test passed:
    • anonymous: denied
    • subscriber: denied
    • manage_options: allowed
    • activate_plugins: allowed
  • Composer metadata validation passed.
  • The exact GitHub Actions release command, npm run release:build, completed under the repository's Node 16 runtime.
  • The generated build/ artifact contains the protected callback and consistent 2.6.6 plugin/readme metadata.
  • The WordPress.org workflow contract was verified against 10up/action-wordpress-plugin-deploy@2.3.0, configured repository variables/secrets, and the live plugin SVN history.

Release procedure after merge

  1. Merge this PR into master.
  2. Fetch the resulting remote master commit and create annotated tag v2.6.6 on that commit. Do not tag this PR branch.
  3. Push only v2.6.6. The Draft Release workflow builds and attaches content-control_v2.6.6.zip.
  4. Inspect the draft release/artifact, then publish it.
  5. Publishing triggers Deploy to WordPress.org, which checks out the tagged commit and deploys build/ to SVN trunk and tags/2.6.6.
  6. Verify the workflow succeeded and WordPress.org SVN exposes tags/2.6.6 with stable tag 2.6.6.

Note: merging to master also triggers the readme/assets workflow. Tag and publish promptly after merge so the new stable-tag metadata is followed immediately by the matching SVN release tag.

Summary by CodeRabbit

  • Bug Fixes
    • Restricted REST API access to global plugin settings to authorized administrators with the appropriate settings permissions.
  • Release
    • Updated the plugin version to 2.6.6.
  • Documentation
    • Added version 2.6.6 release notes and updated the documented stable version.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 30e56289-1162-4148-a698-20893fdcdae7

📥 Commits

Reviewing files that changed from the base of the PR and between e2d5c1d and ca897bf.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • .github/workflows/php-ci-tests.yml
  • CHANGELOG.md
  • classes/RestAPI/Settings.php
  • content-control.php
  • package.json
  • readme.txt

📝 Walkthrough

Walkthrough

The release restricts readable global settings REST access, updates version and changelog metadata to 2.6.6, and changes PHPCS and PHPStan workflows to use PHP 8.3 with revised dependency and autoloader setup.

Changes

Settings Access Release

Layer / File(s) Summary
Settings permission and release metadata
classes/RestAPI/Settings.php, content-control.php, package.json, CHANGELOG.md, readme.txt
The readable settings route now uses update_settings_permissions. Version metadata and changelogs identify release 2.6.6 and document restricted administrator access.

PHP CI Installation

Layer / File(s) Summary
PHP 8.3 dependency setup
.github/workflows/php-ci-tests.yml
The PHPCS and PHPStan jobs use PHP 8.3. Composer scripts are disabled, Strauss runs with cleared authentication variables, and the autoloader is regenerated.

Estimated code review effort: 3 (Moderate) | ~20 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/rest-settings-hotfix-2.6.6

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@danieliser
danieliser marked this pull request as ready for review August 13, 2026 22:51
@danieliser
danieliser merged commit 8410ff2 into master Aug 13, 2026
2 checks passed
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