Skip to content

Commit

Permalink
Merge pull request #332 from tamaskozak/master
Browse files Browse the repository at this point in the history
Fix check_password function and use the standard rabbitmq api call instead
  • Loading branch information
cmurphy committed Apr 7, 2015
2 parents 7dd5c74 + 8bbfe32 commit f45bbcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f45bbcc

Please sign in to comment.