Skip to content

Commit

Permalink
security #cve-2019-18887 [HttpKernel] Use constant time comparison in…
Browse files Browse the repository at this point in the history
… UriSigner (stof)

This PR was merged into the 3.4 branch.
  • Loading branch information
nicolas-grekas committed Nov 12, 2019
2 parents 7064ff3 + 23151ed commit 0102134
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpKernel/UriSigner.php
Expand Up @@ -79,7 +79,7 @@ public function check($uri)
$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)
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/HttpKernel/composer.json
Expand Up @@ -21,6 +21,7 @@
"symfony/http-foundation": "~3.4.12|~4.0.12|^4.1.1",
"symfony/debug": "^3.3.3|~4.0",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-php56": "~1.8",
"psr/log": "~1.0"
},
"require-dev": {
Expand Down

0 comments on commit 0102134

Please sign in to comment.