summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2015-10-10 01:18:47 +0300
committerMichael Klishin <mklishin@pivotal.io>2015-10-10 01:18:52 +0300
commit63cc2bb9391a34901de50b092f59045b1daf9289 (patch)
tree7b812624b7a05fa3fd2d67bc1c8ef887029cad36
parent379258b9d9ff7d9c52c1fd1fe05e76d0d3a9120d (diff)
parentc712c3a6eb024260b33ceff698150483bcf324e3 (diff)
downloadrabbitmq-server-git-63cc2bb9391a34901de50b092f59045b1daf9289.tar.gz
Merge branch 'rabbitmq-server-270' (again)
-rw-r--r--src/rabbit_upgrade_functions.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rabbit_upgrade_functions.erl b/src/rabbit_upgrade_functions.erl
index f516737fbc..485e5cdefc 100644
--- a/src/rabbit_upgrade_functions.erl
+++ b/src/rabbit_upgrade_functions.erl
@@ -105,11 +105,15 @@ remove_user_scope() ->
end,
[user_vhost, permission]).
+%% this is an early migration that hashes passwords using MD5,
+%% only relevant to those migrating from 2.1.1.
+%% all users created after in 3.6.0 or later will use SHA-256 (unless configured
+%% otherwise)
hash_passwords() ->
transform(
rabbit_user,
fun ({user, Username, Password, IsAdmin}) ->
- Hash = rabbit_auth_backend_internal:hash_password(Password),
+ Hash = rabbit_auth_backend_internal:hash_password(rabbit_password_hashing_md5, Password),
{user, Username, Hash, IsAdmin}
end,
[username, password_hash, is_admin]).