aboutsummaryrefslogtreecommitdiff
path: root/server/szurubooru
diff options
context:
space:
mode:
authorShyam Sunder2020-01-12 12:54:28 -0500
committerShyam Sunder2020-01-12 12:54:28 -0500
commit0ff9f9d5a2e1871a8fb236d9bc757fc9a18c7c0f (patch)
tree381e84d988b923ae0e33f6f1ce5c81cf443ad770 /server/szurubooru
parentdce7136f1559aeebc4c29872d83b8668e3190308 (diff)
server/func/posts: explicity specify MD5 for post security hash
Diffstat (limited to 'server/szurubooru')
-rw-r--r--server/szurubooru/func/posts.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/szurubooru/func/posts.py b/server/szurubooru/func/posts.py
index 532bd23..ee58633 100644
--- a/server/szurubooru/func/posts.py
+++ b/server/szurubooru/func/posts.py
@@ -88,7 +88,8 @@ FLAG_MAP = {
def get_post_security_hash(id: int) -> str:
return hmac.new(
config.config['secret'].encode('utf8'),
- str(id).encode('utf-8')).hexdigest()[0:16]
+ msg=str(id).encode('utf-8'),
+ digestmod='md5').hexdigest()[0:16]
def get_post_content_url(post: model.Post) -> str:

© 2015 - 2026 Jakob L. Kreuze