From 2650772db3b38e4718afdb0e4ce6499ba15e7b94 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 22 Jan 2016 15:53:21 -0500 Subject: [PATCH] add delimiters to per-user torrent filenames --- util/registry/torrent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/registry/torrent.py b/util/registry/torrent.py index 400b00836..fe6ea49f0 100644 --- a/util/registry/torrent.py +++ b/util/registry/torrent.py @@ -58,7 +58,7 @@ def public_torrent_filename(blob_uuid): return hashlib.sha256(blob_uuid).hexdigest() def per_user_torrent_filename(user_uuid, blob_uuid): - return hashlib.sha256(blob_uuid + user_uuid + FILENAME_PEPPER).hexdigest() + return hashlib.sha256(FILENAME_PEPPER + "||" + blob_uuid + "||" + user_uuid).hexdigest() class PieceHasher(object):