Home

>

Tools

>

WordPress

>

Releases

>

3.8.23

WordPress Release: 3.8.23

Tag Name: 3.8.23

Release Date: 10/31/2017

WordPress LogoWordPress

World's most popular open-source content management system powering over 40% of all websites. Offers extensive plugin ecosystem, themes, and robust community support for blogs, e-commerce, and corporate websites. Highly customizable and scalable platform suitable for beginners and advanced developers.

TL;DR

WordPress 3.8.23 restores support for numbered placeholders in wpdb::prepare() function

This maintenance release fixes a critical database functionality issue introduced in a previous update. WordPress 3.8.23 restores support for numbered placeholders in database queries processed through the wpdb::prepare() method, which was removed in version 3.8.22 despite being widely used by developers. The update also adds additional safety checks to ensure the correct number of arguments are passed to the function based on the number of placeholders in the query.

Highlight of the Release

    • Restored support for numbered placeholders in wpdb::prepare() database queries
    • Added validation to ensure the correct number of arguments are passed to wpdb::prepare()
    • Fixed compatibility issues with plugins and themes that relied on numbered placeholder syntax

Migration Guide

No migration steps are required for this update. The release restores previously available functionality, so code that was working before the removal of numbered placeholders should work again after updating to WordPress 3.8.23.

If you had implemented workarounds to address the removal of numbered placeholders in version 3.8.22, those workarounds should continue to function but are no longer necessary.

Upgrade Recommendations

Immediate Upgrade Recommended

All WordPress 3.8.x users should upgrade to version 3.8.23 as soon as possible, especially if your site uses plugins or themes that might rely on numbered placeholders in database queries. This update restores important functionality that may be critical for proper operation of your WordPress installation and third-party extensions.

The update addresses a compatibility issue that could potentially cause database query errors on sites using affected code. Since database functionality is core to WordPress operation, this update should be considered high priority.

Bug Fixes

Database Query Preparation Fix

This release fixes a critical issue with the wpdb::prepare() method by restoring support for numbered placeholders in SQL queries. In the previous version (3.8.22), support for numbered placeholders was removed via changeset 41496, which broke compatibility with many existing plugins and themes that relied on this functionality.

The fix includes:

  • Restoration of support for numbered placeholders (like %1$s, %2$d) in database queries
  • Support for a subset of placeholder formatting options that were previously available
  • Implementation of additional validation to ensure the correct number of arguments are provided based on the number of placeholders in the query

This change helps maintain backward compatibility while also improving the security of database queries by ensuring proper parameter usage.

New Features

No new features were added in this maintenance release. This update focuses on restoring previously available functionality that was inadvertently removed.

Security Updates

While not explicitly labeled as a security fix, the restoration of numbered placeholders in wpdb::prepare() includes additional validation checks that help ensure database queries are properly sanitized. By verifying that the correct number of arguments are provided for the placeholders in a query, this update helps prevent potential SQL injection vulnerabilities that could arise from improperly formatted queries.

Performance Improvements

No specific performance improvements were included in this release. The focus was on restoring functionality and ensuring compatibility with existing code.

Impact Summary

WordPress 3.8.23 addresses a significant compatibility issue by restoring support for numbered placeholders in the wpdb::prepare() method. This functionality, while technically undocumented, was widely used by developers in plugins and themes.

The impact of this release is primarily positive for the WordPress ecosystem:

  1. Restored Compatibility: Sites using plugins or themes that relied on numbered placeholders will regain full functionality without requiring updates to those extensions.

  2. Improved Security: The addition of validation checks ensures that database queries are properly formatted with the correct number of arguments for placeholders, reducing the risk of SQL injection vulnerabilities.

  3. Developer Experience: WordPress developers can continue using numbered placeholder syntax in their database queries without needing to refactor existing code.

  4. Ecosystem Stability: By maintaining backward compatibility with established coding patterns, this release helps preserve the stability of the broader WordPress ecosystem.

This maintenance release demonstrates WordPress's commitment to backward compatibility while also enhancing security through additional validation measures.

Statistics:

File Changed8
Line Additions587
Line Deletions51
Line Changes638
Total Commits3

User Affected:

  • Developers who used numbered placeholders in `wpdb::prepare()` can now continue using this syntax without breaking their code
  • Additional validation ensures developers are passing the correct number of arguments to match placeholders
  • Code that was broken by the previous removal of this feature will now work again

Contributors:

pentoswissspidy