File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def initialize ber_object
8282
8383 case @app_tag
8484 when BindResult
85- parse_ldap_result ber_object [ 1 ]
85+ parse_bind_response ber_object [ 1 ]
8686 when SearchReturnedData
8787 parse_search_return ber_object [ 1 ]
8888 when SearchResultReferral
@@ -129,6 +129,18 @@ def parse_ldap_result sequence
129129 end
130130 private :parse_ldap_result
131131
132+ #
133+ # parse_bind_response
134+ # A Bind Response may have an additional field, ID [7], serverSaslCreds, per RFC 2251 pgh 4.2.3.
135+ #
136+ def parse_bind_response sequence
137+ sequence . length >= 3 or raise LdapPduError
138+ @ldap_result = { :resultCode => sequence [ 0 ] , :matchedDN => sequence [ 1 ] , :errorMessage => sequence [ 2 ] }
139+ @ldap_result [ :serverSaslCreds ] = sequence [ 3 ] if sequence . length >= 4
140+ @ldap_result
141+ end
142+ private :parse_bind_response
143+
132144 #
133145 # parse_search_return
134146 # Definition from RFC 1777 (we're handling application-4 here)
You can’t perform that action at this time.
0 commit comments