mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Use sanitize_key() instead of esc_sql() when 'escaping' variable DB field names. see #21767.
git-svn-id: https://develop.svn.wordpress.org/trunk@24714 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -393,7 +393,7 @@ class WP_User_Query {
|
||||
|
||||
$this->query_fields = array();
|
||||
foreach ( $qv['fields'] as $field )
|
||||
$this->query_fields[] = $wpdb->users . '.' . esc_sql( $field );
|
||||
$this->query_fields[] = $wpdb->users . '.' . sanitize_key( $field );
|
||||
$this->query_fields = implode( ',', $this->query_fields );
|
||||
} elseif ( 'all' == $qv['fields'] ) {
|
||||
$this->query_fields = "$wpdb->users.*";
|
||||
|
||||
Reference in New Issue
Block a user