Ticket #42431: 42431.diff
| File 42431.diff, 647 bytes (added by , 8 years ago) |
|---|
-
src/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 : (string) rand();1949 $salt = defined( 'AUTH_SALT' ) && AUTH_SALT ? AUTH_SALT : (string) rand(); 1950 1950 1951 1951 $placeholder = '{' . hash_hmac( $algo, uniqid( $salt, true ), $salt ) . '}'; 1952 1952 }