Enforce activation key to be a string.

git-svn-id: https://develop.svn.wordpress.org/trunk@11799 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-08-11 05:29:36 +00:00
parent 151bd98491
commit 7199d04255
1 changed files with 1 additions and 1 deletions

View File

@ -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));