Skip to content

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

Closed
@darix

Description

@darix
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions