From: Tim Düsterhus Date: Wed, 3 Aug 2022 13:16:48 +0000 (+0200) Subject: Store SHA-256 hashes in wcf1_package_installation_file_log during WCFSetup X-Git-Tag: 6.0.0_Alpha_1~1083 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3ecca468cbd1f23bbad557df33af6265184d1622;p=GitHub%2FWoltLab%2FWCF.git Store SHA-256 hashes in wcf1_package_installation_file_log during WCFSetup see 01ec69848a725e649b045f26cd16720581071076 --- diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index 6fe5de48f4..877dd42bfb 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -954,13 +954,19 @@ final class WCFSetup extends WCF // save file log if (!empty($fileInserts)) { $sql = "INSERT INTO wcf1_package_installation_file_log - (packageID, filename, application) - VALUES (?, ?, ?)"; + (packageID, filename, application, sha256, lastUpdated) + VALUES (?, ?, ?, ?, ?)"; $statement = self::getDB()->prepareStatement($sql); self::getDB()->beginTransaction(); foreach ($fileInserts as $file) { - $statement->execute([1, $file, 'wcf']); + $statement->execute([ + 1, + $file, + 'wcf', + \hash_file('sha256', \WCF_DIR . $file, true), + \TIME_NOW, + ]); } self::getDB()->commitTransaction(); }