From 2306cd31893fc8faa88528fdbb0a745a6dfd1b6c Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Tue, 3 Jul 2018 14:28:50 +0200 Subject: [PATCH] base: drop usage of md5 for calculation of version hash. --- rhodecode/lib/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rhodecode/lib/base.py b/rhodecode/lib/base.py index 1912d59c..b2c93d1e 100644 --- a/rhodecode/lib/base.py +++ b/rhodecode/lib/base.py @@ -42,7 +42,7 @@ from rhodecode.lib.auth import AuthUser, CookieStoreWrapper from rhodecode.lib.exceptions import UserCreationError from rhodecode.lib.utils import (password_changed, get_enabled_hook_classes) from rhodecode.lib.utils2 import ( - str2bool, safe_unicode, AttributeDict, safe_int, md5, aslist, safe_str) + str2bool, safe_unicode, AttributeDict, safe_int, sha1, aslist, safe_str) from rhodecode.model.db import Repository, User, ChangesetComment from rhodecode.model.notification import NotificationModel from rhodecode.model.settings import VcsSettingsModel, SettingsModel @@ -256,7 +256,7 @@ class BasicAuth(AuthBasicAuthenticator): def calculate_version_hash(config): - return md5( + return sha1( config.get('beaker.session.secret', '') + rhodecode.__version__)[:8]