github / github/github-ldap

Net::LDAP.new deprecation warning

Open
#100 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
158
Forks
28
PR merge metrics
No merged PRs in 30d

Description

When `encryption` parameter is passed as String to Net::LDAP.new

```
ldap_options = {
...
encryption: 'ssl',
}
ldap = GitHub::Ldap.new ldap_options
```

it produces the following [deprecation warning](https://github.com/ruby-ldap/ruby-net-ldap/blob/78e97ed69dc9ebbf06b04e7e70ceb046c23de75c/lib/net/ldap.rb#L622)
`Deprecation warning: please give :encryption option as a Hash to Net::LDAP.new`

At [present](https://github.com/ruby-ldap/ruby-net-ldap/blob/78e97ed69dc9ebbf06b04e7e70ceb046c23de75c/lib/net/ldap.rb#L483), the `encryption` value must be a Hash with parameters, which consists of two keys:
`method:` - `:simple_tls` or `:start_tls`
`tls_options:` - Hash of options for that method

Contributor guide

Open the contributing guide

Research direction

Start at the GitHub::Ldap.new entry point and trace how ldap_options reaches Net::LDAP.new. Compare the String form with lib/net/ldap.rb around lines 483 and 622, where the accepted Hash shape and warning are described. Done means the LDAP initialization no longer produces this deprecation warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
authentication
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.