Skip to content

X-Fields 2.0.1 — Audit fixes

Latest

Choose a tag to compare

@github-actions github-actions released this 16 Nov 15:28
75b44bd

Audit of the 2.0 code (modern libraries, migrations, WordPress APIs) with HTTP fuzzing of every endpoint.

Fixed

  • Data loss: Relationship fields (and the "Posts" placement rule) hid selected posts whose post type is excluded from search (post_type => 'any'); saving again dropped them. Now all registered post types are looked up.
  • Fatal error (PHP 8 TypeError) when a field definition or an imported field group contained an array where a string was expected; malformed entries are now skipped.
  • PHP warning when the AJAX nonce was sent as an array; invalid nonces now return 403.

Security

  • The 1.x → 2.x migration only runs with real X-Fields 1.x evidence (its table or post type); a generic xf_version option from another plugin is no longer touched.
  • Term field: selected terms are restricted to the allowed taxonomies (no term names from other taxonomies via tampered IDs).
  • Inline JSON in <script> blocks uses JSON_HEX_TAG | JSON_HEX_AMP.
  • get() ignores non-scalar field names; import ignores non-scalar names, labels and notes.

Tests

  • 48 smoke/security checks and 11 migration checks (new: malformed definitions, typed import, hidden post types, term restriction, inline JSON, foreign xf_version).

Recommended update — fixes data loss in Relationship fields pointing to post types excluded from search.

Install: download x-fields-v2.0.1.zip below. Requires WordPress 6.2+ and PHP 7.4+.

Full changelog: v2.0.0...v2.0.1