From 277b0b81a860f4518d7bf0cc0951e77f9c99336d Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Fri, 16 Jun 2023 22:40:51 +0200 Subject: [PATCH] cache sync: check archive TAM --- src/borg/cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/borg/cache.py b/src/borg/cache.py index 77df3fc59..a6ec061ed 100644 --- a/src/borg/cache.py +++ b/src/borg/cache.py @@ -755,7 +755,8 @@ def fetch_and_build_idx(archive_id, decrypted_repository, chunk_idx): nonlocal processed_item_metadata_chunks csize, data = decrypted_repository.get(archive_id) chunk_idx.add(archive_id, 1, len(data)) - archive = ArchiveItem(internal_dict=msgpack.unpackb(data)) + archive, verified = self.key.unpack_and_verify_archive(data, force_tam_not_required=True) + archive = ArchiveItem(internal_dict=archive) if archive.version not in (1, 2): # legacy raise Exception("Unknown archive metadata version") if archive.version == 1: