Hi guys,
Here is a simple patch to include a wrapper for "%20" to " " in base context
name. If not included, context dn including "%20" are not wrapped correctly
and try to delete the entry through it's full dn (dawn jndi !)
Before commiting it, does someone have any comment about this crappy patch ?
Regards,
--
Sebastien BAHLOUL
IAM Open Source Products Manager
LINAGORA : http://www.linagora.com/
Tel / Phone : +33 810 251 251
Mobile : +33 (0)6 45 63 27 39
74/80 rue Roque de Fillol
92800 Puteaux
-----------
http://linid.org/ - http://linpki.org/
IAM and security Open Source projects
Index: src/main/java/org/lsc/jndi/JndiServices.java
===================================================================
--- src/main/java/org/lsc/jndi/JndiServices.java (révision 837)
+++ src/main/java/org/lsc/jndi/JndiServices.java (copie de travail)
@@ -451,10 +451,13 @@
return null;
}
+ // Rewritte "%20" to " " in contextDn
+ String spaceProtectedContextDn = contextDn.replaceAll("%20", " ");
+
String rewrittenBase = null;
- if (base.toLowerCase().endsWith(contextDn.toLowerCase())) {
- if (!base.equalsIgnoreCase(contextDn)) {
- rewrittenBase = base.substring(0, base.toLowerCase().lastIndexOf(contextDn.toLowerCase()) - 1);
+ if (base.toLowerCase().endsWith(spaceProtectedContextDn.toLowerCase())) {
+ if (!base.equalsIgnoreCase(spaceProtectedContextDn)) {
+ rewrittenBase = base.substring(0, base.toLowerCase().lastIndexOf(spaceProtectedContextDn.toLowerCase()) - 1);
} else {
rewrittenBase = "";
}
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-dev mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-dev