From ef3358ef30b0088f68f741584a4530489ba30772 Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Wed, 17 Jan 2024 14:52:42 +0000 Subject: [PATCH] Switch to hash_equals --- src/Illuminate/Filesystem/Filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Filesystem/Filesystem.php b/src/Illuminate/Filesystem/Filesystem.php index 23fc17eeb03c..c9485337c299 100644 --- a/src/Illuminate/Filesystem/Filesystem.php +++ b/src/Illuminate/Filesystem/Filesystem.php @@ -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)); } /**