From 8c3ad4e860c7cf0f754547a0bab2d68dd7f5b9df Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sun, 2 Feb 2014 22:09:19 +0000 Subject: [PATCH] Consistently trim and unslash search queries for the users list tables. props aubreypwd. fixes #26115. git-svn-id: https://develop.svn.wordpress.org/trunk@27077 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-ms-users-list-table.php | 2 +- src/wp-admin/includes/class-wp-users-list-table.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/class-wp-ms-users-list-table.php b/src/wp-admin/includes/class-wp-ms-users-list-table.php index 271fe5a093..df0640686b 100644 --- a/src/wp-admin/includes/class-wp-ms-users-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-users-list-table.php @@ -16,7 +16,7 @@ class WP_MS_Users_List_Table extends WP_List_Table { function prepare_items() { global $usersearch, $role, $wpdb, $mode; - $usersearch = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : ''; + $usersearch = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : ''; $users_per_page = $this->get_items_per_page( 'users_network_per_page' ); diff --git a/src/wp-admin/includes/class-wp-users-list-table.php b/src/wp-admin/includes/class-wp-users-list-table.php index 48c9c0c256..12a974c048 100644 --- a/src/wp-admin/includes/class-wp-users-list-table.php +++ b/src/wp-admin/includes/class-wp-users-list-table.php @@ -35,7 +35,7 @@ class WP_Users_List_Table extends WP_List_Table { function prepare_items() { global $role, $usersearch; - $usersearch = isset( $_REQUEST['s'] ) ? trim( $_REQUEST['s'] ) : ''; + $usersearch = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : ''; $role = isset( $_REQUEST['role'] ) ? $_REQUEST['role'] : '';