Skip to content

Commit

Permalink
Fix check_password function and use the standard rabbitmq api call in…
Browse files Browse the repository at this point in the history
…stead
  • Loading branch information
tamas.kozak committed Mar 24, 2015
1 parent 75f17a1 commit 8bbfe32
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 8bbfe32

Please sign in to comment.