Skip to content

Commit

Permalink
Query: Improve sanitization within WP_Meta_Query.
Browse files Browse the repository at this point in the history
Props vortfu, xknown, dd32.
Built from https://develop.svn.wordpress.org/trunk@52455


git-svn-id: http://core.svn.wordpress.org/trunk@52047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
desrosj committed Jan 6, 2022
1 parent 271b1f6 commit c9c4dab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wp-includes/class-wp-meta-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ protected function find_compatible_table_alias( $clause, $parent_query ) {
$clause_compare = strtoupper( $clause['compare'] );
$sibling_compare = strtoupper( $sibling['compare'] );
if ( in_array( $clause_compare, $compatible_compares, true ) && in_array( $sibling_compare, $compatible_compares, true ) ) {
$alias = $sibling['alias'];
$alias = preg_replace( '/\W/', '_', $sibling['alias'] );
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/class-wp-tax-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ protected function find_compatible_table_alias( $clause, $parent_query ) {

// The sibling must both have compatible operator to share its alias.
if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators, true ) ) {
$alias = $sibling['alias'];
$alias = preg_replace( '/\W/', '_', $sibling['alias'] );
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.0-alpha-52454';
$wp_version = '6.0-alpha-52455';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit c9c4dab

Please sign in to comment.