Daniel Sheffield 1 жил өмнө
parent
commit
47f5e770b1
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      rest/hash_util.py

+ 1 - 1
rest/hash_util.py

@@ -34,7 +34,7 @@ def blake_file(path: str, person: bytes = None, root: str ='rest/static') -> byt
     fd = os.open(f'{root}/{path}', os.O_RDONLY, 0o600)
     with open(fd, "rb") as f:
         f.seek(0)
-        _blake = blake2b(usedforsecurity=False, digest_size=DIGEST_SIZE_BYTES, person='upload'.encode('utf-8'))
+        _blake = blake2b(usedforsecurity=False, digest_size=DIGEST_SIZE_BYTES, person=person)
         while f.peek(1):
             _blake.update(f.read(1024))
     return _blake.digest()