Subject: | LDAP password utf encoding |
Date: | Sun, 23 May 2010 22:58:13 +0200 |
To: | "'bug-RT-Authen-ExternalAuth [...] rt.cpan.org'" <bug-RT-Authen-ExternalAuth [...] rt.cpan.org> |
From: | "AnD-Institut (Andreas Kammerer)" <kammerer [...] and.at> |
Hi!
I had some problems using ldap-login with special characters in passwords (in my case, a ! was in it) against Active Directory (Windows Server 2008 R2). I found that you have to utf8 encode the password. My changes to LDAP.pm around line 79.
# THIS bind determines success or failure on the password.
my $encpass = $password;
utf8::encode($encpass);
$ldap_msg = $ldap->bind($ldap_dn, password => $encpass);
Maybe thats useful also for others.
By the way: Great work! Very readable code, also for a perl newbe like me ;)
Greetings from Austria,
Andreas Kammerer, CMC
Geschäftsführer
kammerer@and.at - www.and.at
Tel.: +43 7276/4282 101 - Fax: +43 7276/4282 99
Absender dieses Mails ist das AnD-Institut Inh. Andreas Kammerer, Rossanger 7, AT-4722 Peuerbach, Gerichtsstand ist AT-4722 Peuerbach. Wenn Sie keine eMails mehr von uns erhalten möchten, antworten Sie bitte auf dieses Mail mit "UNSUBSCRIBE" im Betreff.