summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2015-10-10 01:14:00 +0300
committerMichael Klishin <mklishin@pivotal.io>2015-10-10 01:14:00 +0300
commitc712c3a6eb024260b33ceff698150483bcf324e3 (patch)
tree6024ae892b0502682dc5fd4e5733123f584fd8df
parent290861c1796f418ab74b688af860acef4125e375 (diff)
downloadrabbitmq-server-git-c712c3a6eb024260b33ceff698150483bcf324e3.tar.gz
Fix migration from 2.1.1
-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]).