bearded / ruby-ldap

Ruby/LDAP is an extension library for Ruby. It provides the interface to some LDAP libraries (e.g. OpenLDAP, Netscape SDK and Active Directory). The common API for application development is described in RFC1823 and is supported by Ruby/LDAP.
http://rubyforge.org/projects/ruby-ldap/
Other
66 stars 34 forks source link

Option parsing bug for LDAP::Conn.sasl_bind #19

Closed pwillred closed 11 years ago

pwillred commented 11 years ago

rb_ldap_conn_sasl_bind appears to assume that the presence of any optional argument infers that all previous optional arguments are present and not nil.

If, for example, the caller wished to bind with options passed into sasl_options, the caller would need to supply non-nil and non default arguments to sctrls, and cctrls as well.

This patch checks that arguments are not nil before using them.

ghost commented 11 years ago

Thank you, @pwillred!