Ticket #8647: pluggable-php.diff
File pluggable-php.diff, 1.6 KB (added by , 16 years ago) |
---|
-
wp-includes/pluggable.php
1242 1242 } else { 1243 1243 $salt = get_option('auth_salt'); 1244 1244 if ( empty($salt) ) { 1245 $salt = wp_generate_password( );1245 $salt = wp_generate_password(64, true, true); 1246 1246 update_option('auth_salt', $salt); 1247 1247 } 1248 1248 } … … 1255 1255 } else { 1256 1256 $salt = get_option('secure_auth_salt'); 1257 1257 if ( empty($salt) ) { 1258 $salt = wp_generate_password( );1258 $salt = wp_generate_password(64, true, true); 1259 1259 update_option('secure_auth_salt', $salt); 1260 1260 } 1261 1261 } … … 1268 1268 } else { 1269 1269 $salt = get_option('logged_in_salt'); 1270 1270 if ( empty($salt) ) { 1271 $salt = wp_generate_password( );1271 $salt = wp_generate_password(64, true, true); 1272 1272 update_option('logged_in_salt', $salt); 1273 1273 } 1274 1274 } … … 1281 1281 } else { 1282 1282 $salt = get_option('nonce_salt'); 1283 1283 if ( empty($salt) ) { 1284 $salt = wp_generate_password( );1284 $salt = wp_generate_password(64, true, true); 1285 1285 update_option('nonce_salt', $salt); 1286 1286 } 1287 1287 } … … 1396 1396 * 1397 1397 * @return string The random password 1398 1398 **/ 1399 function wp_generate_password($length = 12, $special_chars = true ) {1399 function wp_generate_password($length = 12, $special_chars = true, $extra_special_chars = false) { 1400 1400 $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; 1401 1401 if ( $special_chars ) 1402 1402 $chars .= '!@#$%^&*()'; 1403 if ( $extra_special_chars ) 1404 $chars .= '-_ []{}<>~`+=,.;:/?|'; 1403 1405 1404 1406 $password = ''; 1405 1407 for ( $i = 0; $i < $length; $i++ )