Ticket #42401: wp-db.diff
File wp-db.diff, 613 bytes (added by , 7 years ago) |
---|
-
wp-includes/wp-db.php
1946 1946 // If ext/hash is not present, compat.php's hash_hmac() does not support sha256. 1947 1947 $algo = function_exists( 'hash' ) ? 'sha256' : 'sha1'; 1948 1948 // Old WP installs may not have AUTH_SALT defined. 1949 $salt = defined( 'AUTH_SALT' ) ? AUTH_SALT : rand();1949 $salt = defined( 'AUTH_SALT' ) ? AUTH_SALT : (string) rand(); 1950 1950 1951 1951 $placeholder = '{' . hash_hmac( $algo, uniqid( $salt, true ), $salt ) . '}'; 1952 1952 }