Skip to content

Version 5.3.7

Latest

Choose a tag to compare

@felipeelia felipeelia released this 03 Dec 15:41
· 0 commits to develop since this release

This is a security release. It fixes the following issue and hardens several other areas of the plugin. Updating is strongly recommended.

  • Custom Search Results: A crafted post title could make an administrator who opened it in the Custom Search Results editor send unintended requests to the WordPress REST API.

Added

  • Content indexed by a feature is deleted from the Elasticsearch index when the feature, or the setting that indexed it, is turned off (can be skipped with the new ep_post_unindexable_documents_query filter). Content left behind by features turned off before this version is deleted the first time an administrator opens the dashboard after the update. If the deletion keeps failing, a notice asks for a full sync. Props @felipeelia via #4437.

Changed

  • Only orderby values supported by WordPress, searchable or faceted meta fields, and values allowed with the new ep_allowed_request_orderby filter are accepted from the URL in the main query. Sites that let visitors sort by other Elasticsearch fields through the URL need to allow them with the filter. Props @felipeelia via #4436.
  • Taxonomy filters from the URL only apply to taxonomies that can be used as facets. Props @felipeelia via #4436.
  • Did You Mean only suggests terms found in content the search can return (adjustable with the new ep_search_suggestion_collate filter), and its output is escaped. Props @felipeelia via #4438.
  • The Related Posts REST endpoints only return related posts for posts the current user can read, return a 404 for posts that do not exist, and return at most 100 posts. Props @felipeelia via #4440.
  • Protected Content stores a placeholder instead of the post password in the index. Posts already in the index are updated the first time an administrator opens the dashboard after the update. If that keeps failing, a notice asks for a full sync. Props @felipeelia via #4444.

Deprecated

  • The ep_save_feature AJAX action. Use the elasticpress/v1/features REST endpoint instead. Props @felipeelia via #4433.

Fixed

  • Dynamic bulk indexing sending a failed request's documents again with every later request, which could repeat forever. Props @rebeccahum via #4414.
  • Syncs counting the objects to sync again for every batch, which made each batch slow on large sites, and ending before objects that became indexable while they ran. Props @rebeccahum via #4416.
  • Invalid markup in the Related Posts block wrapper. Props @felipeelia via #4418.
  • The legacy epDataFilter global not being applied to Autosuggest results. Props @felipeelia via #4421.
  • Authorization: undefined header sent in Instant Results requests. Props @felipeelia via #4422.
  • Fatal error when a facet parameter is sent as an array in the URL. Props @felipeelia via #4423.
  • Instant Results crashing when the URL contains an unknown post type. Props @felipeelia via #4424.
  • Requests to Elasticsearch dropping the URL's query parameters after the first one. Props @felipeelia via #4426.
  • Syncs started from the dashboard reporting a different method in the first request (dashboard) than in the following ones (web). Props @felipeelia via #4427.
  • "Exclude from search results" not applied to Instant Results (regression in 5.3.0) and to searches that fall back to MySQL. Props @felipeelia via #4435.
  • Comments not removed from the index when moderated by users without moderate_comments or without a logged-in user, and not synced when their post is unpublished, trashed, or restored (adjustable with the new ep_skip_action_sync_post_comments filter). Props @felipeelia via #4439.
  • Distinct meta keys missing from the Status Report. Props @felipeelia via #4442.

Security

  • Encode the search term in the Custom Search Results preview request, preventing cross-site request forgery. Props Santh, @felipeelia, and @jeffpaul via GHSA-6f8h-pg5c-p4g3.
  • Improved capability checks in admin request handlers and REST endpoints. Props @felipeelia via #4433.
  • Mask credentials included in the Elasticsearch host URL wherever it is displayed. Props @felipeelia via #4434.
  • The Sync REST endpoint only accepts its declared parameters. Props @felipeelia via #4441.
  • Status Report values are displayed as text (fields can opt in to HTML with the new allow_html option), report messages are sanitized, and hidden feature settings are validated when saved. Props @felipeelia via #4442.
  • Meta facets only list values of content the user can see, and facet blocks only render previews in the block editor. Props @felipeelia via #4443.
  • Autosuggest and Instant Results only display inline formatting HTML in post titles (adjustable with the new ep.titleAllowedHTML JS filter), and highlight search terms without changing the HTML. Props @felipeelia via #4445.
  • Bumped fast-xml-parser from 5.11.2 to 5.12.0. Props @dependabot via #4412.

Developer

See: https://github.com/10up/ElasticPress/milestone/98?closed=1