Skip to content

Defensive hardening improvements for 6.9.10 - #604

Merged
cbravobernal merged 1 commit into
trunkfrom
claude/defensive-hardening
Nov 20, 2026
Merged

cbravobernal merged 1 commit into
trunkfrom
claude/defensive-hardening

Conversation

@cbravobernal

Copy link
Copy Markdown
Contributor

What

This PR brings defensive hardening improvements for SCF 6.9.10.

  • Harden Options Page saves
  • Harden Block Bindings and shortcode access for local fields
  • Harden User values in REST output
  • Harden meta box callback edits
  • Harden WYSIWYG field output
  • Harden form input serialization
  • Harden the Block Bindings placeholder in the site editor
  • Harden comment, term and user form saves

Changes for developers

  • Fields registered in PHP or loaded from Local JSON are no longer output through Block Bindings or the [acf] shortcode unless they set allow_in_bindings to true. Fields saved in the database keep their current behavior.
  • Only super admins can edit the meta box callback of a post type or taxonomy. The new enable_meta_box_cb_edit setting turns this off for everyone.
  • allow_in_bindings is now part of the field JSON schema, so the field export ability accepts fields that have it.

Testing

These changes were tested together on top of current trunk:

  • PHPUnit, Jest and PHPStan pass.
  • The full E2E suite passes on a local test site.
  • A local smoke test loaded the field group, post, options page, settings, post type, taxonomy, user, term, comment and front-end screens, plus REST responses, with no PHP errors.

Use of AI Tools

Claude Code (Claude Opus 5.5) applied the changes, resolved the conflicts with trunk and ran the tests.

🤖 Generated with Claude Code

- Harden Options Page saves: check option ownership, guard front-end
  option writes, and warn when a save blocks submitted values.
- Harden Block Bindings and shortcode access for local fields: PHP and
  Local JSON fields need allow_in_bindings to be output, and duplicating
  a field keeps its stored setting.
- Harden User values in REST output, including User fields in Flexible
  Content rows.
- Harden meta box callback edits on post types and taxonomies.
- Harden WYSIWYG field output.
- Harden form input serialization.
- Harden the Block Bindings placeholder in the site editor.
- Harden comment, term and user form saves.
- Allow allow_in_bindings in the field JSON schema, so exported fields
  that have it pass validation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cbravobernal
cbravobernal merged commit 563ec85 into trunk Nov 20, 2026
20 checks passed
@cbravobernal
cbravobernal deleted the claude/defensive-hardening branch November 20, 2026 13:56
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