Enforce activation key to be a string.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -187,7 +187,7 @@ function reset_password($key) {
|
||||
|
||||
$key = preg_replace('/[^a-z0-9]/i', '', $key);
|
||||
|
||||
if ( empty( $key ) || is_array( $key ) )
|
||||
if ( empty( $key ) || !is_string( $key ) )
|
||||
return new WP_Error('invalid_key', __('Invalid key'));
|
||||
|
||||
$user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE user_activation_key = %s", $key));
|
||||
|
||||
Reference in New Issue
Block a user