Ensure that apage and num cannot have negative values. Fixes #11786 props Denis-de-Bernardy.
git-svn-id: https://develop.svn.wordpress.org/trunk@12637 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
820991ac95
commit
8fc78f4a06
|
@ -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}' ";
|
||||
|
|
Loading…
Reference in New Issue