Skip to content

Version 0.10.1 gives wrap_with_ssl: undefined method empty? error #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
maryheintz opened this issue Dec 17, 2014 · 11 comments · Fixed by #176
Closed

Version 0.10.1 gives wrap_with_ssl: undefined method empty? error #175

maryheintz opened this issue Dec 17, 2014 · 11 comments · Fixed by #176
Assignees

Comments

@maryheintz
Copy link

I'm having an issue with the following script.

#!/Users/mary/Software/rubies/2.1.4/bin/ruby

require 'rubygems'
gem 'net-ldap', '0.10.1'
require 'net/ldap'

ldap = Net::LDAP.new :host => "server.example.com",
  :port => 636,
  :encryption => { :method => :simple_tls },
  :auth => {
    :method=>:simple,
    :username=>"uid=user1,ou=people,dc=server,dc=example,dc=com",
    :password=>"password"
  }

if ldap.bind
 print "OK\n"
else
 print "Not OK\n"
end
yo:test $ ./check_ldap 
/Users/mary/Software/rubies/2.1.4/lib/ruby/gems/2.1.0/gems/net-ldap-0.10.1/lib/net/ldap/connection.rb:51:in `wrap_with_ssl': undefined method `empty?' for nil:NilClass (NoMethodError)
    from /Users/mary/Software/rubies/2.1.4/lib/ruby/gems/2.1.0/gems/net-ldap-0.10.1/lib/net/ldap/connection.rb:94:in `setup_encryption'
    from /Users/mary/Software/rubies/2.1.4/lib/ruby/gems/2.1.0/gems/net-ldap-0.10.1/lib/net/ldap/connection.rb:25:in `initialize'
    from /Users/mary/Software/rubies/2.1.4/lib/ruby/gems/2.1.0/gems/net-ldap-0.10.1/lib/net/ldap.rb:847:in `new'
    from /Users/maryh/Software/rubies/2.1.4/lib/ruby/gems/2.1.0/gems/net-ldap-0.10.1/lib/net/ldap.rb:847:in `block in bind'
    from /Users/maryh/Software/rubies/2.1.4/lib/ruby/gems/2.1.0/gems/net-ldap-0.10.1/lib/net/ldap/instrumentation.rb:19:in `instrument'
    from /Users/maryh/Software/rubies/2.1.4/lib/ruby/gems/2.1.0/gems/net-ldap-0.10.1/lib/net/ldap.rb:841:in `bind'
    from ./check_ldap:16:in `<main>'

If I change the version of net-ldap to 0.9.0, the script works fine.

Our server is running RedHat Enterprise 5.11. Openldap version 2.3.43.

@jch jch self-assigned this Dec 17, 2014
@jch
Copy link
Member

jch commented Dec 17, 2014

Thanks for the detailed bug report. The fix is in #176, and will be included in the next release.

@jch jch closed this as completed Dec 17, 2014
@tengchh
Copy link

tengchh commented Jan 6, 2015

I have the same issue with search function, even with 0.9.0

@jch
Copy link
Member

jch commented Jan 7, 2015

@tengchh could you include a code sample that's causing the crash and also the stack trace. I want to make sure it's the same error, or if it's a separate nil issue. cc #168

@jch jch reopened this Jan 7, 2015
@christianvuerings
Copy link

@jch Thanks for this fix! Do you have an idea when the next release might happen? We would love to start using the SimpleTLS/StartTLS encryption options in 0.10.x

@jch
Copy link
Member

jch commented Jan 14, 2015

@ChristianV I have a few other pulls to review and merge, but I plan to cut a release (0.10.2) by this Friday, 1/16.

@christianvuerings
Copy link

@jch Thanks for the update!

@tengchh
Copy link

tengchh commented Jan 14, 2015

                                                                                  My thanks as well.                                                                                                                                                                                                                                                                                                                                         Sent from my BlackBerry 10 smartphone.                                                                                                                                                                                                                From: Christian VueringsSent: Wednesday, January 14, 2015 18:11To: ruby-ldap/ruby-net-ldapReply To: ruby-ldap/ruby-net-ldapCc: tengchhSubject: Re: [ruby-net-ldap] Version 0.10.1 gives wrap_with_ssl: undefined method empty? error (#175)@jch Thanks for the update!

—Reply to this email directly or view it on GitHub.

@maryheintz
Copy link
Author

Thanks!

-Mary

On Jan 14, 2015, at 5:08 PM, Jerry Cheung [email protected] wrote:

@ChristianV I have a few other pulls to review and merge, but I plan to cut a release (0.10.2) by this Friday, 1/16.


Reply to this email directly or view it on GitHub.

@christianvuerings
Copy link

@jch do you have an update on this? Is this fixed in 0.11?

@jch
Copy link
Member

jch commented Feb 20, 2015

@ChristianV yes, it was fixed in #176, which is included in 0.11. https://github.com/ruby-ldap/ruby-net-ldap/blob/master/History.rdoc

@jch jch closed this as completed Feb 20, 2015
@christianvuerings
Copy link

@jch Thank you! Have a great weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants