composer update
This commit is contained in:
6
vendor/symfony/http-kernel/UriSigner.php
vendored
6
vendor/symfony/http-kernel/UriSigner.php
vendored
@@ -79,15 +79,15 @@ class UriSigner
|
||||
$hash = $params[$this->parameter];
|
||||
unset($params[$this->parameter]);
|
||||
|
||||
return $this->computeHash($this->buildUrl($url, $params)) === $hash;
|
||||
return hash_equals($this->computeHash($this->buildUrl($url, $params)), $hash);
|
||||
}
|
||||
|
||||
private function computeHash($uri)
|
||||
private function computeHash(string $uri): string
|
||||
{
|
||||
return base64_encode(hash_hmac('sha256', $uri, $this->secret, true));
|
||||
}
|
||||
|
||||
private function buildUrl(array $url, array $params = [])
|
||||
private function buildUrl(array $url, array $params = []): string
|
||||
{
|
||||
ksort($params, SORT_STRING);
|
||||
$url['query'] = http_build_query($params, '', '&');
|
||||
|
||||
Reference in New Issue
Block a user