From 6881380fc0fe005a5ae93fa9c8baf7bb05702d78 Mon Sep 17 00:00:00 2001 From: westi Date: Sun, 16 May 2010 20:34:02 +0000 Subject: [PATCH] Don't return data for user 1 when passed in junk like an array. See #13317. git-svn-id: http://svn.automattic.com/wordpress/trunk@14695 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index d8a30cd22..595d102c8 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -103,10 +103,13 @@ if ( !function_exists('get_userdata') ) : function get_userdata( $user_id ) { global $wpdb; + if ( ! is_numeric( $user_id ) ) + return false; + $user_id = absint( $user_id ); if ( ! $user_id ) return false; - + $user = wp_cache_get( $user_id, 'users' ); if ( $user )