We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b72c4a8 commit 4898d81Copy full SHA for 4898d81
lib/net/ldap.rb
@@ -551,7 +551,11 @@ def initialize(args = {})
551
@hosts = args[:hosts]
552
@verbose = false # Make this configurable with a switch on the class.
553
@auth = args[:auth] || DefaultAuth
554
- @base = args[:base] || DefaultTreebase
+ @base = args[:base] || if @uri.path && @uri.path.length > 1
555
+ URI.decode(@uri.path[1..-1])
556
+ else
557
+ DefaultTreebase
558
+ end
559
@force_no_page = args[:force_no_page] || DefaultForceNoPage
560
@encryption = normalize_encryption(args[:encryption]) # may be nil
561
if @uri.scheme == 'ldaps'
0 commit comments