Return false if cookie_hash is not set.
This commit is contained in:
parent
424bc62e74
commit
6c8709f4b5
|
@ -140,7 +140,7 @@ class WC_Session_Handler extends WC_Session {
|
|||
$to_hash = $customer_id . '|' . $session_expiration;
|
||||
$hash = hash_hmac( 'md5', $to_hash, wp_hash( $to_hash ) );
|
||||
|
||||
if ( ! hash_equals( $hash, $cookie_hash ) ) {
|
||||
if ( empty( $cookie_hash ) || ! hash_equals( $hash, $cookie_hash ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue