Make WordPress Core


Ignore:
Timestamp:
01/06/2022 05:21:51 PM (2 years ago)
Author:
desrosj
Message:

Query: Improve sanitization within WP_Meta_Query.

Merges [52455] to the 5.9 branch.
Props vortfu, xknown, dd32.

Location:
branches/5.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

  • branches/5.9/src/wp-includes/class-wp-meta-query.php

    r52332 r52460  
    849849            $sibling_compare = strtoupper( $sibling['compare'] );
    850850            if ( in_array( $clause_compare, $compatible_compares, true ) && in_array( $sibling_compare, $compatible_compares, true ) ) {
    851                 $alias = $sibling['alias'];
     851                $alias = preg_replace( '/\W/', '_', $sibling['alias'] );
    852852                break;
    853853            }
Note: See TracChangeset for help on using the changeset viewer.