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
This commit is contained in:
westi 2010-01-07 07:54:15 +00:00
parent 197cdd2bbb
commit d759368680

View File

@ -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}' ";