Skip to content

Commit

Permalink
Fix: first 5 characters is too weak for collisions (#454)
Browse files Browse the repository at this point in the history
Use full length of MD5 to make collisions more difficult
  • Loading branch information
bckp authored Oct 23, 2024
1 parent 08387d5 commit 4740f66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Runner/TestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private function initiateTestCase(Test $test, $foo, PhpInterpreter $interpreter)
$methods = null;

if ($this->tempDir) {
$cacheFile = $this->tempDir . DIRECTORY_SEPARATOR . 'TestHandler.testCase.' . substr(md5($test->getSignature()), 0, 5) . '.list';
$cacheFile = $this->tempDir . DIRECTORY_SEPARATOR . 'TestHandler.testCase.' . md5($test->getSignature()) . '.list';
if (is_file($cacheFile)) {
$cache = unserialize(file_get_contents($cacheFile));

Expand Down

0 comments on commit 4740f66

Please sign in to comment.