vavavr00m / pwm

Automatically exported from code.google.com/p/pwm
0 stars 0 forks source link

Fix for active directory domain names that contain other characters than [a-Z0-9] #266

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. If your active directory domain has for example hyphens(-) the ldapchai 
library that pwm uses parses the DN wrong.
It uses regexp to search for DCs in your DN, the regexp is (dc=[a-z0-9]+[,]*)+
If you have for example dc=domain-name,dc=com then it would parse it as 
"domain" and subsequent ldap requests fail...
Problem is here: 
http://code.google.com/p/ldapchai/source/browse/trunk/src/com/novell/ldapchai/im
pl/ad/entry/UserImpl.java on row 63

What is the expected output?
To work for domain names with allowed special characters.
On special characters: http://www.rlmueller.net/CharactersEscaped.htm

What version of PWM are you using?
1.6.3

What ldap directory are you using?
Active Directory

What can i do?
You don't have to recompile everything, just extract 
servlet\web\WEB-INF\lib\ldapChai.jar\com\novell\ldapchai\impl\ad\entry\UserImpl.
class from your pwm.war or pwm.zip file
Edit the class file with something capable (I used 
http://classeditor.sourceforge.net/, dont forget to turn edit mode on) and then 
plug it back. Deploy.
I edited ours like this (dc=[a-z0-9-]+[,]*)+ for domains with hyphens.

Original issue reported on code.google.com by jar.z...@gmail.com on 22 Aug 2012 at 11:56

GoogleCodeExporter commented 9 years ago
ldapChai defect:

http://code.google.com/p/ldapchai/issues/detail?id=7

Original comment by jrivard on 22 Aug 2012 at 8:46

GoogleCodeExporter commented 9 years ago
Added in revision 532.   sorry for the long delay.

Original comment by jrivard on 11 Mar 2013 at 10:10