From 141840c0d9b7518458f4d1c4fed6b05ce5902fe3 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Wed, 20 Oct 2021 12:43:41 +0200 Subject: [PATCH] Changed hashing algorithm for docids in bridged apps --- src/bridge/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bridge/__init__.py b/src/bridge/__init__.py index a3a886b1..9ed79468 100644 --- a/src/bridge/__init__.py +++ b/src/bridge/__init__.py @@ -111,7 +111,7 @@ def isextsupported(fileext): def _gendocid(wopisrc): '''Generate a URL safe hash of the wopisrc to be used as document id by the app''' - dig = hmac.new(WB.hashsecret.encode(), msg=wopisrc.split('/')[-1].encode(), digestmod=hashlib.sha1).digest() + dig = hmac.new(WB.hashsecret.encode(), msg=wopisrc.split('/')[-1].encode(), digestmod=hashlib.blake2b).digest() return urlsafe_b64encode(dig).decode()[:-1]