# HG changeset patch # User Marcin Kuzminski # Date 2018-07-03 12:28:50 # Node ID 8eabdef2d8dd9af11a2a9a954a9169d6fa191c80 # Parent b65d885f17dd31ef133952c63684d99c2a8b73da base: drop usage of md5 for calculation of version hash. diff --git a/rhodecode/lib/base.py b/rhodecode/lib/base.py --- a/rhodecode/lib/base.py +++ b/rhodecode/lib/base.py @@ -42,7 +42,7 @@ from rhodecode.lib.auth import AuthUser, 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]