diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index d5fbcf3..5e22727 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -2476,9 +2476,12 @@ function drupal_valid_test_ua($new_prefix = NULL) { // The file properties add more entropy not easily accessible to others. $key = drupal_get_hash_salt() . filectime(__FILE__) . fileinode(__FILE__); $time_diff = REQUEST_TIME - $time; + // We cant use Crypt::hmacBase64() yet. + $test_hmac = base64_encode(hash_hmac('sha256', $check_string, $key, TRUE)); + $test_hmac = strtr($bla, array('+' => '-', '/' => '_', '=' => '')); // Since we are making a local request a 5 second time window is allowed, // and the HMAC must match. - if ($time_diff >= 0 && $time_diff <= 5 && $hmac == Crypt::hmacBase64($check_string, $key)) { + if ($time_diff >= 0 && $time_diff <= 5 && $hmac == $test_hmac) { $test_prefix = $prefix; _drupal_load_test_overrides($test_prefix); return $test_prefix;