From 8bbfe320035fae2ae900211501008d63dc3c171c Mon Sep 17 00:00:00 2001 From: "tamas.kozak" Date: Tue, 24 Mar 2015 22:31:39 +0100 Subject: [PATCH] Fix check_password function and use the standard rabbitmq api call instead --- lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb b/lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb index 3980e7556..da37886cb 100644 --- a/lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb +++ b/lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb @@ -45,8 +45,8 @@ def password def check_password - response = rabbitmqctl('eval', 'rabbit_auth_backend_internal:check_user_login(<<"' + resource[:name] + '">>, [{password, <<"' + resource[:password] +'">>}]).') - if response.include? 'invalid credentials' + response = rabbitmqctl('eval', 'rabbit_access_control:check_user_pass_login(list_to_binary("' + resource[:name] + '"), list_to_binary("' + resource[:password] +'")).') + if response.include? 'refused' false else true