Validate built-in attachment image metadata shape#362
Merged
Conversation
Report malformed _wp_attachment_metadata.image_meta through the built-in WordPress upload validator and keep the media validator regression coverage current.
Merged
adamziel
added a commit
that referenced
this pull request
May 18, 2026
## Release `v0.1.42` Version bump for `v0.1.42`. **Changelog draft:** * Tighten built-in upload metadata file validation (#361) * Validate built-in attachment image metadata shape (#362) **Full changelog:** v0.1.41...release/v0.1.42 ## Verification * `git diff --check` * `cargo metadata --no-deps --format-version 1` ## Next steps Merging this PR prepares the release commit. Tagging the merged trunk commit as `v0.1.42` will run the release workflow and publish binaries. Co-authored-by: Codex <codex@openai.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.
What it does
Reports malformed
_wp_attachment_metadata.image_metathrough the built-in WordPress upload validator asplugin-wp-attachment-metadata-invalid-shape.Rationale
The discovered media validator already caught malformed
image_meta, but the production WordPress-scoped validator did not. That left a core attachment metadata shape invariant dependent on an optional mu-plugin validator.Implementation
When readable attachment metadata contains
image_metaand it is not an array, the built-in validator records a review-only invalid-shape conflict with:field: _wp_attachment_metadata.image_metarole: image-metavalue_typeThe roadmap doc wording now reflects that upload metadata coverage comes from both discovered and built-in validators.
Testing instructions