Skip to content

Commit

Permalink
fix WORKAROUNDS=authenticated_no_key support for archive TAM authenti…
Browse files Browse the repository at this point in the history
…cation, fixes #8400
  • Loading branch information
ThomasWaldmann committed Sep 20, 2024
1 parent 30cd3b8 commit 2c18620
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/borg/crypto/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ def unpack_and_verify_archive(self, data, force_tam_not_required=False):
unpacker = get_limited_unpacker('archive')
unpacker.feed(data)
unpacked = unpacker.unpack()
if AUTHENTICATED_NO_KEY:
return unpacked, True, None # True is a lie.

Check warning on line 309 in src/borg/crypto/key.py

View check run for this annotation

Codecov / codecov/patch

src/borg/crypto/key.py#L309

Added line #L309 was not covered by tests
if b'tam' not in unpacked:
if tam_required:
archive_name = unpacked.get(b'name', b'<unknown>').decode('ascii', 'replace')
Expand Down

0 comments on commit 2c18620

Please sign in to comment.