ZF-7322: getCanonicalAccountName() in Zend_Ldap bind function ignores options array
Description
In the bind() in the Zend_Ldap class the call
$username = $this->getCanonicalAccountName($username, Zend_Ldap::ACCTNAME_FORM_PRINCIPAL);
is hard coded for UPN and ignores what is set in the options array. We are unable to authenticate with MS Active Directory using this code. If I change the Zend_Ldap::ACCTNAME_FORM_PRINCIPAL to $_options['accountCanonicalForm'] and set 3 in the config file all is well. I'm not sure if the usage of Zend_Ldap::ACCTNAME_FORM_PRINCIPAL is intentional. I think the permitted options is setOptions should set a default value and then all calls to getCanonicalAccountName() can use what's in the $_options array.
I can patch and test the code and submit it that helps.
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2009-07-20T10:31:35.000+0000
Assigning to Stefan.
Posted by Stefan Gehrig (sgehrig) on 2009-07-20T11:27:46.000+0000
fixed in trunk rev. 16886