Changeset 13137
- Timestamp:
- 02/14/2010 04:06:30 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/schema.php
r13070 r13137 266 266 267 267 // 2.0.3 268 'secret' => wp_generate_password( 64),268 'secret' => wp_generate_password( 64, true, true ), 269 269 270 270 // 2.1 -
trunk/wp-admin/setup-config.php
r13133 r13137 190 190 require_once( ABSPATH . WPINC . '/pluggable.php' ); 191 191 for ( $i = 0; $i < 8; $i++ ) 192 $secret_keys[] = wp_generate_password( 64 );192 $secret_keys[] = wp_generate_password( 64, true, true ); 193 193 } else { 194 194 $secret_keys = explode( "\n", wp_remote_retrieve_body( $secret_keys ) ); -
trunk/wp-includes/pluggable.php
r13133 r13137 1309 1309 $salt = get_option('auth_salt'); 1310 1310 if ( empty($salt) ) { 1311 $salt = wp_generate_password( 64);1311 $salt = wp_generate_password( 64, true, true ); 1312 1312 update_option('auth_salt', $salt); 1313 1313 } … … 1322 1322 $salt = get_option('secure_auth_salt'); 1323 1323 if ( empty($salt) ) { 1324 $salt = wp_generate_password( 64);1324 $salt = wp_generate_password( 64, true, true ); 1325 1325 update_option('secure_auth_salt', $salt); 1326 1326 } … … 1335 1335 $salt = get_option('logged_in_salt'); 1336 1336 if ( empty($salt) ) { 1337 $salt = wp_generate_password( 64);1337 $salt = wp_generate_password( 64, true, true ); 1338 1338 update_option('logged_in_salt', $salt); 1339 1339 } … … 1348 1348 $salt = get_option('nonce_salt'); 1349 1349 if ( empty($salt) ) { 1350 $salt = wp_generate_password( 64);1350 $salt = wp_generate_password( 64, true, true ); 1351 1351 update_option('nonce_salt', $salt); 1352 1352 } … … 1462 1462 * 1463 1463 * @param int $length The length of password to generate 1464 * @param bool $special_chars Whether to include standard special characters 1464 * @param bool $special_chars Whether to include standard special characters. Default true. 1465 * @param bool $extra_special_chars Whether to include more special characters. Used 1466 * when generating secret keys and salts. Default false. 1465 1467 * @return string The random password 1466 1468 **/ 1467 function wp_generate_password( $length = 12, $special_chars = true) {1469 function wp_generate_password( $length = 12, $special_chars = true, $extra_special_chars = false ) { 1468 1470 $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; 1469 if ( $special_chars ) 1471 if ( $special_chars ) { 1470 1472 $chars .= '!@#$%^&*()'; 1473 if ( $extra_special_chars ) 1474 $chars .= '-_ []{}<>~`+=,.;:/?|'; 1475 } 1471 1476 1472 1477 $password = '';
Note: See TracChangeset
for help on using the changeset viewer.