Issue #121 has been updated by Clément OUDOT.
Status changed from Feedback to Assigned
Assigned to changed from Clément OUDOT to Raphaël Ouazana
The call to @javax.naming.ldap.Rdn.escapeValue@ works to apply the MODRDN :
<pre>
mai 13 15:13:48 - INFO - # Renaming object
uid=coudot3,ou=users2,dc=example,dc=com for user
# Tue May 13 15:13:48 CEST 2014
dn: uid=coudot3,ou=users2,dc=example,dc=com
changetype: modrdn
newrdn: uid=coudot\>3
deleteoldrdn: 1
newsuperior: ou=users2,dc=example,dc=com
</pre>
But at the next run, we get an error:
<pre>
mai 13 15:14:03 - ERROR - Error while renaming entry
uid=coudot>3,ou=users2,dc=example,dc=com in directory
:javax.naming.InvalidNameException: uid=coudot>3,ou=users2: [LDAP: error code
34 - invalid DN]; remaining name 'uid=coudot>3,ou=users2'
mai 13 15:14:03 - ERROR - Error while synchronizing ID
uid=coudot>3,ou=users2,dc=example,dc=com: java.lang.Exception: Technical
problem while applying modifications to the destination
mai 13 15:14:03 - DEBUG - java.lang.Exception: Technical problem while applying
modifications to the destination
java.lang.Exception: Technical problem while applying modifications to the
destination
at org.lsc.SynchronizeTask.run(AbstractSynchronize.java:785)
[lsc-core-2.1-SNAPSHOT.jar:na]
at org.lsc.SynchronizeTask.run(AbstractSynchronize.java:691)
[lsc-core-2.1-SNAPSHOT.jar:na]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_55]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_55]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]
# Tue May 13 15:14:03 CEST 2014
dn: uid=coudot>3,ou=users2,dc=example,dc=com
changetype: modrdn
newrdn: uid=coudot\>3
deleteoldrdn: 1
</pre>
Seems the DN needs to be escaped inside LSC code when comparing DN.
----------------------------------------
Feature #121: [sync] function to escape special characters in RDN
http://tools.lsc-project.org/issues/121
Author: Thomas Chemineau
Status: Assigned
Priority: Normal
Assigned to: Raphaël Ouazana
Category: Core
Target version: 2.1
RFC say:
8<--------
If the UTF-8 string does not have any of the following characters
which need escaping, then that string can be used as the string
representation of the value.
o a space or "#" character occurring at the beginning of the
string
o a space character occurring at the end of the string
o one of the characters ",", "+", """, "\", "<", ">" or ";"
Implementations MAY escape other characters.
If a character to be escaped is one of the list shown above, then it
is prefixed by a backslash ('\' ASCII 92).
Otherwise the character to be escaped is replaced by a backslash and
two hex digits, which form a single byte in the code of the
character.
8<--------
It could be useful, when we build our one DN, to have a function that verify
and escape special characters in the RDN value, as mentioned above.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://tools.lsc-project.org/my/account
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-dev mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-dev