Skip to content

Commit

Permalink
MaxSaslChallenges => MAX_SASL_CHALLENGES, because it's a constant and…
Browse files Browse the repository at this point in the history
… Rubocop
  • Loading branch information
Tom Maher committed Aug 26, 2016
1 parent 944ea47 commit 5bcde6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/net/ldap/auth_adapter/sasl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Net
class LDAP
class AuthAdapter
class Sasl < Net::LDAP::AuthAdapter
MaxSaslChallenges = 10
MAX_SASL_CHALLENGES = 10

#--
# Required parameters: :mechanism, :initial_credential and
Expand Down Expand Up @@ -49,7 +49,7 @@ def bind(auth)
end

return pdu unless pdu.result_code == Net::LDAP::ResultCodeSaslBindInProgress
raise Net::LDAP::SASLChallengeOverflowError, "sasl-challenge overflow" if ((n += 1) > MaxSaslChallenges)
raise Net::LDAP::SASLChallengeOverflowError, "sasl-challenge overflow" if ((n += 1) > MAX_SASL_CHALLENGES)

cred = chall.call(pdu.result_server_sasl_creds)
end
Expand Down

0 comments on commit 5bcde6e

Please sign in to comment.