Skip to content

Commit

Permalink
Switch to hash_equals (#49721)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhamp authored Jan 17, 2024
1 parent 158767f commit 72e9965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Filesystem/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ public function hasSameHash($firstFile, $secondFile)
{
$hash = @md5_file($firstFile);

return $hash && $hash === @md5_file($secondFile);
return $hash && hash_equals($hash, (string) @md5_file($secondFile));
}

/**
Expand Down

0 comments on commit 72e9965

Please sign in to comment.