diff options
| author | Shyam Sunder | 2020-01-12 12:54:28 -0500 |
|---|---|---|
| committer | Shyam Sunder | 2020-01-12 12:54:28 -0500 |
| commit | 0ff9f9d5a2e1871a8fb236d9bc757fc9a18c7c0f (patch) | |
| tree | 381e84d988b923ae0e33f6f1ce5c81cf443ad770 | |
| parent | dce7136f1559aeebc4c29872d83b8668e3190308 (diff) | |
server/func/posts: explicity specify MD5 for post security hash
| -rw-r--r-- | server/szurubooru/func/posts.py | 3 |
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: |