瀏覽代碼

Merge pull request #8402 from ThomasWaldmann/fix-authenticated-no-key-1.2

fix authenticated_no_key (1.2-maint)
TW 8 月之前
父節點
當前提交
9da4236298
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/borg/crypto/key.py

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

@@ -296,6 +296,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')