From a01907f79e41e2f7137dc96ac1c28a91f89675ac Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 28 May 2026 19:11:43 +0200 Subject: [PATCH] storelocking: use sha256 for lock, not xxh64 --- src/borg/storelocking.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/borg/storelocking.py b/src/borg/storelocking.py index ce30bdbe6..6417c0981 100644 --- a/src/borg/storelocking.py +++ b/src/borg/storelocking.py @@ -1,10 +1,9 @@ import datetime +import hashlib import json import random import time -from xxhash import xxh64 - from borgstore.store import ObjectNotFound from . import platform @@ -101,7 +100,7 @@ class Lock: timestamp = now.isoformat(timespec="milliseconds") lock = dict(exclusive=exclusive, hostid=self.id[0], processid=self.id[1], threadid=self.id[2], time=timestamp) value = json.dumps(lock).encode("utf-8") - key = xxh64(value).hexdigest() + key = hashlib.sha256(value).hexdigest() logger.debug(f"LOCK-CREATE: creating lock in store. key: {key}, lock: {lock}.") self.store.store(f"locks/{key}", value) if update_last_refresh: