Index: /branches/2.5/wp-login.php =================================================================== --- /branches/2.5/wp-login.php (revision 7632) +++ /branches/2.5/wp-login.php (revision 7837) @@ -94,5 +94,5 @@ if ( empty($key) ) { // Generate something random for a key... - $key = wp_generate_password(); + $key = wp_generate_password(20, false); do_action('retrieve_password_key', $user_login, $key); // Now insert the new md5 key into the db Index: /branches/2.5/wp-includes/pluggable.php =================================================================== --- /branches/2.5/wp-includes/pluggable.php (revision 7822) +++ /branches/2.5/wp-includes/pluggable.php (revision 7837) @@ -1169,6 +1169,9 @@ * @return string The random password **/ -function wp_generate_password($length = 12) { - $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()"; +function wp_generate_password($length = 12, $special_chars = true) { + $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + if ( $special_chars ) + $chars .= '!@#$%^&*()'; + $password = ''; for ( $i = 0; $i < $length; $i++ )