Skip to content

v1.3.0: Safer invalidation, credential fixes and multisite hardening

Latest

Choose a tag to compare

@notglossy notglossy released this 17 Oct 16:51
0d9e5fd

This release stops routine edits from purging the whole CloudFront distribution, fixes stored credential handling, and locks multisite configuration to network admins. It also includes the 1.2.1–1.2.3 work, which was never released separately.

Security

  • On multisite, configuring the plugin and running a manual invalidation now require manage_network_options, so sub-site admins can no longer point the network's AWS credentials at another distribution (filterable with notglossy_cloudfront_settings_capability).

Fixed

  • Drafts, private and scheduled posts, revisions, auto-drafts, menu items and private taxonomies no longer purge the entire distribution (/*). Deleting a published post purges only its URL and listings.
  • Changing a slug, parent or date purges the old URL; renaming or deleting a term purges its old archive. Block editor saves purge current and removed terms. Wildcards are anchored (/slug/*) so they no longer match sibling URLs.
  • Access keys can be changed from the settings page again, and the first save on a fresh install keeps the entered keys.
  • Credentials stored by v1.1.0 / v1.2.0 are migrated and re-encrypted automatically.
  • On multisite, content changed under switch_to_blog() goes to that site's distribution.

Added

  • One batched invalidation per request, falling back to /* above CloudFront's limits.
  • Comments, allowlisted post meta, and WooCommerce price and stock changes (including stock reduced by orders) invalidate the affected post or product.
  • CLOUDFRONT_DISTRIBUTION_ID, CLOUDFRONT_AWS_REGION and CLOUDFRONT_USE_IAM_ROLE constants.
  • notglossy_cloudfront_invalidation_paths, notglossy_cloudfront_meta_keys and notglossy_cloudfront_client_config filters; WP_IMPORTING and wp_suspend_cache_invalidation() are respected.
  • Stored-credentials status and a "Remove the stored access keys" control on the settings page; HTTP timeouts on the CloudFront client.

Changed

  • Access-key mode no longer falls back to AWS credentials found on the server when no usable key pair is configured; an admin notice explains why invalidations are paused.
  • Requires WordPress 5.7 or later.
  • A blank AWS Region defaults to us-east-1.
  • Dependencies updated to clear published advisories (AWS SDK, Guzzle, guzzlehttp/psr7, jmespath.php).

See the README changelog for the full list.