Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0102134

Browse files
security #cve-2019-18887 [HttpKernel] Use constant time comparison in UriSigner (stof)
This PR was merged into the 3.4 branch.
2 parents 7064ff3 + 23151ed commit 0102134

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Symfony/Component/HttpKernel/UriSigner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function check($uri)
7979
$hash = $params[$this->parameter];
8080
unset($params[$this->parameter]);
8181

82-
return $this->computeHash($this->buildUrl($url, $params)) === $hash;
82+
return hash_equals($this->computeHash($this->buildUrl($url, $params)), $hash);
8383
}
8484

8585
private function computeHash($uri)

src/Symfony/Component/HttpKernel/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"symfony/http-foundation": "~3.4.12|~4.0.12|^4.1.1",
2222
"symfony/debug": "^3.3.3|~4.0",
2323
"symfony/polyfill-ctype": "~1.8",
24+
"symfony/polyfill-php56": "~1.8",
2425
"psr/log": "~1.0"
2526
},
2627
"require-dev": {

0 commit comments

Comments
 (0)