Skip to content

Commit 94abe52

Browse files
authored
Merge branch 'master' into fix-paged-search
2 parents faf7eea + 7f060e1 commit 94abe52

File tree

7 files changed

+14
-9
lines changed

7 files changed

+14
-9
lines changed

Diff for: History.rdoc

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
=== Net::LDAP 0.19.0
2+
* Net::LDAP::DN - Retain trailing spaces in RDN values in DNs #412
3+
* Add in ability for users to specify LDAP controls when conducting searches #411
4+
* Document connect_timeout in Constructor Details #415
5+
* Fix openssl error when using multiple hosts #417
6+
17
=== Net::LDAP 0.18.0
28
* Fix escaping of # and space in attrs #408
39
* Add support to use SNI #406

Diff for: lib/net/ldap.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1257,10 +1257,10 @@ def search_subschema_entry
12571257
rs = search(:ignore_server_caps => true, :base => "",
12581258
:scope => SearchScope_BaseObject,
12591259
:attributes => [:subschemaSubentry])
1260-
return Net::LDAP::Entry.new unless (rs and rs.first)
1260+
return Net::LDAP::Entry.new unless rs and rs.first
12611261

12621262
subschema_name = rs.first.subschemasubentry
1263-
return Net::LDAP::Entry.new unless (subschema_name and subschema_name.first)
1263+
return Net::LDAP::Entry.new unless subschema_name and subschema_name.first
12641264

12651265
rs = search(:ignore_server_caps => true, :base => subschema_name.first,
12661266
:scope => SearchScope_BaseObject,

Diff for: lib/net/ldap/auth_adapter/gss_spnego.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def bind(auth)
2020
require 'ntlm'
2121

2222
user, psw = [auth[:username] || auth[:dn], auth[:password]]
23-
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless (user && psw)
23+
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless user && psw
2424

2525
nego = proc do |challenge|
2626
t2_msg = NTLM::Message.parse(challenge)

Diff for: lib/net/ldap/auth_adapter/sasl.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Sasl < Net::LDAP::AuthAdapter
3030
def bind(auth)
3131
mech, cred, chall = auth[:mechanism], auth[:initial_credential],
3232
auth[:challenge_response]
33-
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless (mech && cred && chall)
33+
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless mech && cred && chall
3434

3535
message_id = @connection.next_msgid
3636

Diff for: lib/net/ldap/auth_adapter/simple.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def bind(auth)
1111
["", ""]
1212
end
1313

14-
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless (user && psw)
14+
raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless user && psw
1515

1616
message_id = @connection.next_msgid
1717
request = [

Diff for: lib/net/ldap/connection.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ def socket_class=(socket_class)
3030
@socket_class = socket_class
3131
end
3232

33-
def prepare_socket(server, timeout=nil)
33+
def prepare_socket(server, timeout=nil, hostname='127.0.0.1')
3434
socket = server[:socket]
3535
encryption = server[:encryption]
36-
hostname = server[:host]
3736

3837
@conn = socket
3938
setup_encryption(encryption, timeout, hostname) if encryption
@@ -51,7 +50,7 @@ def open_connection(server)
5150
errors = []
5251
hosts.each do |host, port|
5352
begin
54-
prepare_socket(server.merge(socket: @socket_class.new(host, port, socket_opts)), timeout)
53+
prepare_socket(server.merge(socket: @socket_class.new(host, port, socket_opts)), timeout, host)
5554
if encryption
5655
if encryption[:tls_options] &&
5756
encryption[:tls_options][:verify_mode] &&

Diff for: lib/net/ldap/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Net
22
class LDAP
3-
VERSION = "0.18.0"
3+
VERSION = "0.19.0"
44
end
55
end

0 commit comments

Comments
 (0)