From 2ff76263ff26e40c53ecec9d9afe2e8061809c10 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sun, 14 Jun 2026 15:07:11 -0500 Subject: [PATCH] fix: recompute checksum after MokoRestore wrapping The SHA-256 checksum was computed before the MokoRestore wrap step, then the archive was replaced with the wrapped version without recomputing the hash. This left the checksum column empty or stale for MokoRestore-wrapped backups. --- .../packages/com_mokosuitebackup/src/Engine/BackupEngine.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/packages/com_mokosuitebackup/src/Engine/BackupEngine.php b/source/packages/com_mokosuitebackup/src/Engine/BackupEngine.php index 3d43533..5f7950c 100644 --- a/source/packages/com_mokosuitebackup/src/Engine/BackupEngine.php +++ b/source/packages/com_mokosuitebackup/src/Engine/BackupEngine.php @@ -227,7 +227,10 @@ class BackupEngine rename($mokoRestorePath, $archivePath); $totalSize = filesize($archivePath); $sizeHuman = number_format($totalSize / 1048576, 2) . ' MB'; + // Recompute checksum for the final wrapped archive + $checksum = hash_file('sha256', $archivePath); $this->log('MokoRestore archive created: ' . $sizeHuman); + $this->log('SHA-256 (wrapped): ' . $checksum); } $remoteFilename = '';