Skip to content
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

passing a string as parameter to :encryption causes unexpected error later on #238

Closed
darix opened this issue Nov 23, 2015 · 4 comments
Closed

Comments

@darix
Copy link

darix commented Nov 23, 2015

ldap = Net::LDAP.new :host => 'localhost', :port => 389, :encryption => 'start_tls'
(net-ldap-0.12.1) /lib/net/ldap/connection.rb:111:in `[]': no implicit conversion of Symbol into Integer (TypeError)
        from (net-ldap-0.12.1) /lib/net/ldap/connection.rb:111:in `setup_encryption'
        from (net-ldap-0.12.1) /lib/net/ldap/connection.rb:27:in `prepare_socket'
        from (net-ldap-0.12.1) /lib/net/ldap/connection.rb:37:in `block in open_connection'
        from (net-ldap-0.12.1) /lib/net/ldap/connection.rb:35:in `each'
        from (net-ldap-0.12.1) /lib/net/ldap/connection.rb:35:in `open_connection'
        from (net-ldap-0.12.1) /lib/net/ldap/connection.rb:16:in `initialize'
        from (net-ldap-0.12.1) /lib/net/ldap.rb:1240:in `new'
        from (net-ldap-0.12.1) /lib/net/ldap.rb:1240:in `new_connection'
        from (net-ldap-0.12.1) /lib/net/ldap.rb:1226:in `use_connection'
        from (net-ldap-0.12.1) /lib/net/ldap.rb:752:in `block in search'
        from (net-ldap-0.12.1) /lib/net/ldap/instrumentation.rb:19:in `instrument'
        from (net-ldap-0.12.1) /lib/net/ldap.rb:751:in `search'
        from (net-ldap-0.12.1) /lib/net/ldap.rb:1138:in `search_root_dse'
        from (net-ldap-0.12.1) /lib/net/ldap.rb:1204:in `paged_searches_supported?'
        from (net-ldap-0.12.1) /lib/net/ldap.rb:744:in `search'
        from ldaptest.rb:11:in `<main>'

This should probably raise a an error in ldap.rb def encryption

@darix
Copy link
Author

darix commented Nov 23, 2015

not sure if bug or feature now.

@darix darix closed this as completed Nov 23, 2015
@darix darix changed the title Example shown for encrypted connection raises TypeError passing a string as parameter to :encryption causes unexpected error later on Nov 23, 2015
@darix darix reopened this Nov 23, 2015
@satoryu
Copy link
Collaborator

satoryu commented Nov 23, 2015

@darix thank you for your bug report. This failure is caused because Net::LDAP#encrypt cannot handle encryption method given as String. I'll fix it later.

@satoryu
Copy link
Collaborator

satoryu commented Jan 8, 2016

This can be closed. @jch

@jch jch closed this as completed Jan 8, 2016
@jch
Copy link
Member

jch commented Jan 8, 2016

@satoryu good call

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

No branches or pull requests

3 participants