Bug 560747 - rdn_validate does not support <key>=\"<dn>\"
Summary: rdn_validate does not support <key>=\"<dn>\"
Keywords:
Status: CLOSED DUPLICATE of bug 555577
Alias: None
Product: 389
Classification: Retired
Component: Server - Plugins
Version: 1.3.0
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Noriko Hosoi
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 434915
TreeView+ depends on / blocked
 
Reported: 2010-02-01 19:01 UTC by Noriko Hosoi
Modified: 2015-01-04 23:41 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-02-01 19:56:20 UTC
Embargoed:


Attachments (Terms of Use)

Description Noriko Hosoi 2010-02-01 19:01:18 UTC
Description of problem:
Sample entry:
dn: ou="cn=admin-serv-ID, cn=389 Administration Server, cn=Server Group, cn=ID.localdomain, ou=localdomain, o=NetscapeRoot",ou=UserPreferences, ou=localdomain, o=NetscapeRoot
objectClass: top
objectClass: organizationalUnit
ou: cn=admin-serv-ID, cn=389 Administration Server, cn=Server Group, cn=ID.localdomain, ou=localdomain, o=netscaperoot

Adding this entry fails at line 498 since *p == '"'.

428	int rdn_validate( const char *begin, const char *end, const char **last )
429	{
            [...]
493		} else {
494			/* Check the leadchar to see if anything illegal
495			 * is there.  We need to allow a 'pair' to get
496			 * through, so we'll assume that a '\' is the
497			 * start of a 'pair' for now. */
498			if (IS_UTF1(*p) && !IS_ESC(*p) && !IS_LUTF1(*p)) {
499				rc = 1;
500				goto exit;
501			}
502		}
503	

(gdb) p *p
$26 = 34 '"'
(gdb) n
500				goto exit;

(gdb) bt
#0  rdn_validate (
    begin=0x7fa168002a40 "ou=\"cn=admin-serv-ID, cn=389 administration server, cn=server group, cn=ID.localdomain, ou=localdomain, o=netscaperoot\",ou=userpreferences,ou=localdomain,o=netscaperoot", 
    end=0x7fa168002b00 "t", last=0x7fa1967f0ac0)
    at ldap/servers/plugins/syntaxes/validate.c:499
#1  0x00007fa1ac5213c4 in distinguishedname_validate (
    begin=0x7fa168002970 "ou=\"cn=admin-serv-ID, cn=389 administration server, cn=server group, cn=ID.localdomain, ou=localdomain, o=netscaperoot\",ou=userpreferences,ou=localdomain,o=netscaperoot", 
    end=0x7fa168002b00 "t") at ldap/servers/plugins/syntaxes/validate.c:393
#2  0x00007fa1ac5194d6 in dn_validate (val=0x7fa1967f0b40)
    at ldap/servers/plugins/syntaxes/dn.c:148
#3  0x00007fa1adbb209d in slapi_dn_syntax_check (pb=0xe72b40, 
    dn=0x7fa168002970 "ou=\"cn=admin-serv-ID, cn=389 administration server, cn=server group, cn=ID.localdomain, ou=localdomain, o=netscaperoot\",ou=userpreferences,ou=localdomain,o=netscaperoot", override=1)
    at ldap/servers/slapd/plugin_syntax.c:308
#4  0x00007fa1a83a6044 in ldbm_back_add (pb=0xe72b40)
    at ldap/servers/slapd/back-ldbm/ldbm_add.c:196
#5  0x00007fa1adb590c3 in op_shared_add (pb=0xe72b40)
    at ldap/servers/slapd/add.c:631
#6  0x00007fa1adb5836c in do_add (pb=0xe72b40) at ldap/servers/slapd/add.c:232
#7  0x0000000000413222 in connection_dispatch_operation (conn=0x7fa1a46b2a10, 
    op=0x114ff10, pb=0xe72b40) at ldap/servers/slapd/connection.c:544
#8  0x00000000004149a2 in connection_threadmain ()
    at ldap/servers/slapd/connection.c:2267
#9  0x0000003816029263 in _pt_root (arg=<value optimized out>)
    at ../../../mozilla/nsprpub/pr/src/pthreads/ptthread.c:228
#10 0x000000380740685a in start_thread (arg=<value optimized out>)
    at pthread_create.c:297
#11 0x00000038068de22d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Comment 1 Rich Megginson 2010-02-01 19:07:43 UTC
That is correct.  I believe the '"' character is not valid anymore, with strict DN syntax checking.

Comment 2 Andrey Ivanov 2010-02-01 19:48:55 UTC
I think it's the same problem asthe bug 555577

Comment 3 Noriko Hosoi 2010-02-01 19:56:20 UTC
(In reply to comment #1)
> That is correct.  I believe the '"' character is not valid anymore, with strict
> DN syntax checking.    

I see.  Then, should we should replace '"' with something else such as a single quote?  (Not sure it's that simple, though... )

(In reply to comment #2)
> I think it's the same problem asthe bug 555577    

Yep, you are right, Andrey.  I'm closing this bug.

*** This bug has been marked as a duplicate of bug 555577 ***


Note You need to log in before you can comment on or make changes to this bug.