Ticket #44032: setup-config.php.diff
File setup-config.php.diff, 739 bytes (added by , 7 years ago) |
---|
-
setup-config.php
old new 294 294 295 295 // Generate keys and salts using secure CSPRNG; fallback to API if enabled; further fallback to original wp_generate_password(). 296 296 try { 297 $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_ []{}<>~`+=,.;:/?|';298 $max = strlen($chars) - 1;299 297 for ( $i = 0; $i < 8; $i++ ) { 300 $key = ''; 301 for ( $j = 0; $j < 64; $j++ ) { 302 $key .= substr( $chars, random_int( 0, $max ), 1 ); 303 } 304 $secret_keys[] = $key; 298 $raw = random_bytes(64); 299 $secret_keys[] = base64_encode($raw); 305 300 } 306 301 } catch ( Exception $ex ) { 307 302 $no_api = isset( $_POST['noapi'] );