Skip to content

Commit 4740f66

Browse files
authored
Fix: first 5 characters is too weak for collisions (#454)
Use full length of MD5 to make collisions more difficult
1 parent 08387d5 commit 4740f66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Runner/TestHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private function initiateTestCase(Test $test, $foo, PhpInterpreter $interpreter)
176176
$methods = null;
177177

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

0 commit comments

Comments
 (0)