Repository navigation
Release - #3188
Merged
Merged
Release#3188
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…d typography (#3185) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix: validate block name type in dynamic content processing * fix: enhance visitor block escaping for unnamed blocks
Contributor
Author
Bundle Size Diff
|
Contributor
Author
|
Plugin build for 146b603 is ready 🛎️!
|
Contributor
Author
E2E TestsPlaywright Test Status: See serial and parallel matrix jobs Performance ResultsserverResponse: {"q25":336.62,"q50":343.87,"q75":371.86,"cnt":10}, firstPaint: {"q25":1247.16,"q50":1328.65,"q75":1473.3,"cnt":10}, domContentLoaded: {"q25":3402.89,"q50":3431.08,"q75":3452.52,"cnt":10}, loaded: {"q25":3405.75,"q50":3434.15,"q75":3455.32,"cnt":10}, firstContentfulPaint: {"q25":2567.04,"q50":2574.32,"q75":2587.5,"cnt":10}, firstBlock: {"q25":16223.46,"q50":16286.36,"q75":16337.51,"cnt":10}, type: {"q25":26.95,"q50":29.86,"q75":32.58,"cnt":10}, typeWithoutInspector: {"q25":25.21,"q50":26.31,"q75":28.29,"cnt":10}, typeWithTopToolbar: {"q25":31.78,"q50":36.66,"q75":46.15,"cnt":10}, typeContainer: {"q25":14.97,"q50":15.38,"q75":15.81,"cnt":10}, focus: {"q25":127.5,"q50":132.22,"q75":140.98,"cnt":10}, inserterOpen: {"q25":41.51,"q50":43.94,"q75":45.77,"cnt":10}, inserterSearch: {"q25":27.69,"q50":28.71,"q75":30.12,"cnt":10}, inserterHover: {"q25":4.51,"q50":4.83,"q75":5.38,"cnt":20}, loadPatterns: {"q25":1722.79,"q50":1767.37,"q75":1788.49,"cnt":10}, listViewOpen: {"q25":217.37,"q50":225.15,"q75":246.22,"cnt":10} |
#3185) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
….0 (#3189) Bumps [php-stubs/woocommerce-stubs](https://github.com/php-stubs/woocommerce-stubs) from 11.2.2 to 11.3.0. - [Commits](php-stubs/woocommerce-stubs@v11.2.2...v11.3.0) --- updated-dependencies: - dependency-name: php-stubs/woocommerce-stubs dependency-version: 11.3.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…on write (#3185) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ement (#3185) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…out a write-back (#3185) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ion (#3185) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
fix: keep theme typography on Atomic Wind blocks (#3185)
The Mailchimp data center is taken from the part of the API key after the dash and used as the request host (`https://<dc>.api.mailchimp.com/...`). validate_api_key() only checked for a single dash, so a Contributor could submit a key such as `x-attacker:8443/r#` through the form editor endpoint and make the server request an arbitrary host, including internal services. - Require the data center to be a bare `[a-z0-9]+` token, so it can only resolve to `*.api.mailchimp.com`. server_name is set only through set_api_key(), which runs this validation first. - Defense in depth: send every Mailchimp request with wp_safe_remote_get()/ wp_safe_remote_post(), so a redirect to a private or loopback address is refused even if a host ever reached the request builder. Reported-by: Deus Rex research team <research@deusrex.ai>
… Wind Posts Grid passed its `postTypes` attribute, and the Atomic Wind box passed its `queryPostType` attribute, straight into WP_Query without checking that the post type is public. A Contributor could point either block at a non-public post type whose entries use the `publish` status (a contact-form inbox, store coupons) and read their titles and excerpts in the preview. - Posts Grid: keep only `is_post_type_viewable()` types; an explicit list of only non-public types returns nothing instead of falling back to posts. - Atomic Wind box: skip the query loop when `queryPostType` is not viewable. - Atomic Wind custom field: skip protected (`_`-prefixed) meta keys, so a Contributor cannot print a submitter's stored contact data either. This extends the `is_post_type_viewable()` check added for the `/otter/v1/dynamic` REST routes to these two block renderers. Reported-by: Deus Rex research team <research@deusrex.ai>
…wp_safe_* wp_safe_remote_get()/wp_safe_remote_post() run wp_http_validate_url() before the HTTP proxy is applied, so on a site that reaches the internet only through WP_PROXY_HOST they would reject the Mailchimp host that local DNS cannot resolve, breaking lists, merge fields and subscriptions. The data-center validation already pins every request host to *.api.mailchimp.com, so the redirect concern is covered by passing 'redirection' => 0 on the normal wp_remote_* calls, with no DNS/proxy regression. - Revert the four Mailchimp requests to wp_remote_get()/wp_remote_post(). - Add 'redirection' => 0 to each request, so a response cannot pivot the request to another address. - Add a test that captures the get_lists() request and asserts the host is the validated data center and redirection is 0.
…field The custom field gate checked the selector, not the meta key ACF reads. When ACF is active, an ACF field key (e.g. `field_abc123`) passes is_protected_meta(), but ACF resolves it to the field's name, which can be a `_`-prefixed protected key holding a form submitter's data. - Resolve the field with get_field_object() and run is_protected_meta() on the field name too, before reading the value. - Add tests with a field key whose field name is protected (skipped) and public (read), backed by minimal ACF stubs. - Posts Grid: assert an all-non-viewable list renders nothing, instead of falling back to posts (covers the early return).
…omment - Keep the redirect rationale on one line only, not repeated on all four. - Extend the request test to also drive get_merge_fields() and the subscribe path (status GET + members PUT), asserting the pinned host and redirection => 0 on every captured request, so dropping the guard from any single request builder fails the test.
Move the protected custom-field meta hardening out of this PR. That guard was the issue's out-of-scope note, and extending it correctly (Atomic Wind plus the Otter Pro dynamic-content and block-conditions paths, at the permission layer so front-end meta display is unaffected) is a separate security issue. This PR now only restricts Posts Grid and the Atomic Wind box query loop to publicly viewable post types, which is the reported bug.
…mic Wind The dynamic-content `acf` tag, the `postMeta`/`acf` dynamic image, the `postMeta` block condition and the Atomic Wind `custom_field` read post meta by a request-supplied key and surface the value, without the protected-key check the text, author and user-meta getters already apply. A Contributor could read a protected `_`-prefixed key of a published post (e.g. a product's `_purchase_note`, or `_`-meta holding tokens) through an editor preview. - Dynamic_Content: guard `get_acf()`, `evaluate_content_media_server()` and `evaluate_content_media_content()` with `is_protected_meta_key()`, and add `is_protected_acf_field()` so an ACF field key that resolves to a protected name is rejected too. - Block_Conditions::has_meta(): never read a protected key, so its value cannot leak through the comparison result. - Atomic Wind `custom_field`: skip protected keys, including the ACF-resolved field name. - Tests for each path; the shared ACF test fixture also stubs get_field/ get_field_object.
Otter Pro live search copied `?o_post_type=` straight into the main search query, so an anonymous visitor could query a non-public post type whose entries are `publish` (e.g. a contact-form inbox) and read their titles and excerpts. The REST `prepare_search_query()` path already filters these; the main-query `parse_query()` path did not. Filter the requested types through `is_post_type_viewable()` and skip the override when none remain.
- is_protected_acf_field(): walk the ACF parent chain, so a sub-field under a protected repeater (reached through the repeater fallback) is rejected too. - Posts_ACF_Integration::render_acf_fields(): skip a protected field selector or resolved field name, matching the dynamic-content guards. - Tests: a sub-field under a `_secret` repeater returns the default; the Posts Grid ACF field prints nothing for a protected field; the dynamic image blocks a protected postMeta.
- Add a guarded `ACF` stub class to the shared fixture so the `class_exists( 'ACF' )`-gated image branches run under tests. - Test the ACF branch of evaluate_content_media_server() and evaluate_content_media_content() blocks a field resolving to a protected name. - Test is_protected_acf_field() returns false on a cyclic parent chain (and terminates), so the cycle guard is covered.
…heck is_protected_meta_key() only matched a `_` prefix and three named keys, so a key another plugin protects through the `is_protected_meta` filter without a `_` prefix (e.g. NextScripts SNAP's keys) still leaked through get_acf(), has_meta() and the postMeta/acf getters. Fall back to is_protected_meta() so those are caught too, matching the Atomic Wind custom field. Add a test that filters a non-prefixed key as protected and expects the fallback.
…meta is_protected_meta_key() always passed 'post' to is_protected_meta(), so a key a plugin protects only for 'user' meta leaked through get_author_meta(), get_loggedin_meta() and the user branch of has_meta(). Add a $meta_type parameter and pass 'user' from those callers.
…e hash get_the_author_meta() maps aliases like `pass` and `activation_key` to `user_pass`/`user_activation_key`, but is_protected_meta_key() matched only the full names, so metaKey `pass` returned the author's password hash. Normalize the user-field aliases to their `user_*` form before the check. Add tests: author meta blocks `pass`/`activation_key`; and user-only is_protected_meta filters are honored for get_loggedin_meta() and the loggedInUserMeta block condition.
The alias rewrite replaced the key before the is_protected_meta filter ran, so a plugin protecting a raw user meta key named like a core alias (e.g. `email`) was missed on the get_user_meta paths. Check the raw key verbatim first, then also the resolved `user_*` alias for the get_the_author_meta mapping. Add tests: a filter on the raw `email` user key is honored by get_loggedin_meta() and the loggedInUserMeta condition.
… check get_the_author_meta() reads user_firstname/user_lastname/user_description via WP_User::__get, which maps them to the first_name/last_name/description meta keys. is_protected_meta_key() checked only the raw name, so a filter on first_name was missed. Resolve those back-compat fields to their real meta key. Also seed user_activation_key in the alias test so the activation_key case fails without the fix, and add a first_name back-compat author-meta test.
get_the_author_meta('user_level') returns the author's capability level (0-10)
via WP_User, and user_level is neither underscore-prefixed nor a core alias, so
is_protected_meta_key() let it through. Add it to the protected list so dynamic
content, block conditions and Atomic Wind cannot expose it.
Add a test: author meta blocks user_level for an administrator author.
…nders The previous commit added user_level to the shared protected-name list, which also blocked post and ACF meta. A public post field literally named user_level (e.g. a course level) stopped rendering. Move the guard to the user-meta branch of is_protected_meta_key, so only author and logged-in user reads are blocked. Add a test: a post field named user_level is still returned.
fix(security): validate Mailchimp data center to prevent authenticated SSRF
fix(security): restrict Posts Grid and Atomic Wind to publicly viewable post types
…ted-meta # Conflicts: # tests/test-atomic-wind-blocks.php
Prevent XSS by disabling Lottie expression evaluation
fix(security): block protected post meta in dynamic content, conditions and Atomic Wind
Enhance data handling for Black Friday
Contributor
Author
|
🎉 This PR is included in version 3.2.12 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Linked issues
This release will close the following issues once merged:
Public changelog