Query: Improve sanitization within `WP_Meta_Query`.
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
This commit is contained in:
parent
271b1f60cd
commit
c9c4dabcc1
|
@ -848,7 +848,7 @@ class WP_Meta_Query {
|
||||||
$clause_compare = strtoupper( $clause['compare'] );
|
$clause_compare = strtoupper( $clause['compare'] );
|
||||||
$sibling_compare = strtoupper( $sibling['compare'] );
|
$sibling_compare = strtoupper( $sibling['compare'] );
|
||||||
if ( in_array( $clause_compare, $compatible_compares, true ) && in_array( $sibling_compare, $compatible_compares, true ) ) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -527,7 +527,7 @@ class WP_Tax_Query {
|
||||||
|
|
||||||
// The sibling must both have compatible operator to share its alias.
|
// The sibling must both have compatible operator to share its alias.
|
||||||
if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators, true ) ) {
|
if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators, true ) ) {
|
||||||
$alias = $sibling['alias'];
|
$alias = preg_replace( '/\W/', '_', $sibling['alias'] );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue