From d75936868002e7b34d59c4e71e0b8b8e403e3c76 Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 7 Jan 2010 07:54:15 +0000 Subject: [PATCH] Ensure that apage and num cannot have negative values. Fixes #11786 props Denis-de-Bernardy. git-svn-id: http://svn.automattic.com/wordpress/trunk@12637 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/ms-sites.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/ms-sites.php b/wp-admin/ms-sites.php index 57a6d974b0..f94e86cb3e 100644 --- a/wp-admin/ms-sites.php +++ b/wp-admin/ms-sites.php @@ -308,8 +308,8 @@ switch( $_GET['action'] ) { // List blogs default: - $apage = isset( $_GET['apage'] ) ? intval( $_GET['apage'] ) : 1; - $num = isset( $_GET['num'] ) ? intval( $_GET['num'] ) : 15; + $apage = ( isset($_GET['apage'] ) && intval( $_GET['apage'] ) ) ? absint( $_GET['apage'] ) : 1; + $num = ( isset($_GET['num'] ) && intval( $_GET['num'] ) ) ? absint( $_GET['num'] ) : 15; $s = wp_specialchars( trim( $_GET[ 's' ] ) ); $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' ";