浏览代码

Merge pull request #8401 from ThomasWaldmann/fix-authenticated-no-key-1.4

fix authenticated_no_key (1.4-maint)
TW 8 月之前
父节点
当前提交
c1bb7ec515
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/borg/crypto/key.py

+ 2 - 0
src/borg/crypto/key.py

@@ -305,6 +305,8 @@ class KeyBase:
         unpacker = get_limited_unpacker('archive')
         unpacker.feed(data)
         unpacked = unpacker.unpack()
+        if AUTHENTICATED_NO_KEY:
+            return unpacked, True, None  # True is a lie.
         if b'tam' not in unpacked:
             if tam_required:
                 archive_name = unpacked.get(b'name', b'<unknown>').decode('ascii', 'replace')