You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by ch...@pegacat.com on 2005/04/29 07:33:05 UTC
[apacheds] JXplorer compatibility; some strangeness with names
Hi Folks,
I've been messing around with custom partitions, and have a couple of
questions...
first (easy) question; is there any way to make the sending of timestamp
information optional, or should this be done inside the partition? At the
moment timestamp info is sent as another attribute, and the directory I'm
using wants to set that stuff itself (as it doesn't trust clients :-) )...
second (yucky) question: I'm having trouble with the handling of 'special'
characters in names. They seem to get mangled between my partition passing
them back (as a naming enumeration of search result objects), and apacheds
making the ldap response.
Specifically, this is the raw LDAP straight from my directory...
0000: 30 82 01 6F 02 01 0A 64 82 01 68 04 44 63 6E 3D 0..o...d..h.Dcn=
0010: 56 69 76 69 65 6E 6E 65 20 5C 22 4C 45 56 45 52 Vivienne \"LEVER
0020: 5C 22 2C 6F 75 3D 41 64 6D 69 6E 69 73 74 72 61 \",ou=Administra
0030: 74 69 6F 6E 2C 6F 75 3D 43 6F 72 70 6F 72 61 74 tion,ou=Corporat
0040: 65 2C 6F 3D 44 45 4D 4F 43 4F 52 50 2C 63 3D 41 e,o=DEMOCORP,c=A
0050: 55 30 82 01 1E 30 1E 04 0B 6F 62 6A 65 63 74 43 U0...0...objectC
0060: 6C 61 73 73 31 0F 04 0D 69 6E 65 74 4F 72 67 50 lass1...inetOrgP
0070: 65 72 73 6F 6E 30 18 04 02 63 6E 31 12 04 10 56 erson0...cn1...V
0080: 69 76 69 65 6E 6E 65 20 22 4C 45 56 45 52 22 30 ivienne "LEVER"0
0090: 0D 04 02 73 6E 31 07 04 05 4C 45 56 45 52 30 24 ...sn1...LEVER0$
(etc.)
This is what I get from apacheDS...
0000: 30 82 01 42 02 01 09 64 82 01 3B 04 17 63 6E 3D 0..B...d..;..cn=
0010: 56 69 76 69 65 6E 6E 65 20 5C 5C 22 4C 45 56 45 Vivienne \\"LEVE
0020: 52 5C 5C 22 30 82 01 1E 30 0D 04 02 73 6E 31 07 R\\"0...0...sn1.
0030: 04 05 4C 45 56 45 52 30 1D 04 0F 74 65 6C 65 70 ..LEVER0...telep
(etc.)
obviously it's shorter, and it misses the higher RDNs (jndi just gives the
relative name; my partition can expand it if necessary?). But more
importantly, it messes up the special characters, and JXplorer displays the
entry as: Vivienne%20%5c%5c%22LEVER%5c%5c%22 . yikes. A similar problem
occurs with names that just have a space (e.g. 'fred nurk'); the spaces get
translated to %20, so it's not just the quote characters above.
If I read back a similar entry from the ApacheDS user partition, it all
works pretty much as expected (e.g. similar to the first option above).
0000: 30 30 02 01 0A 65 2B 0A 01 00 04 24 75 69 64 3D 00...e+....$uid=
0010: 66 72 65 64 20 5C 22 6E 75 72 6B 5C 22 2C 6F 75 fred \"nurk\",ou
0020: 3D 75 73 65 72 73 2C 6F 75 3D 73 79 73 74 65 6D =users,ou=system
0030: 04 00 ..
... and the entry displays correctly in JXplorer.
So...
1) Does a partition need to return full names rather than relative names
in the BackingStore 'search()' method?
2) Do these names need to be pre-processed in any way to avoid multiple
escapings of characters in names?
Any thoughts?
- Chris