generatedata
generatedata copied to clipboard
LDIF export does not suppress blank output
The LDIF export feature (which is fantastic, BTW) appends all rows as fields in the output, even if they result in no value. Blank values are invalid LDIF in most LDAP servers and result in an error.
Scenario:
Create a row for an attribute that can result in an empty output by design:
Column Title: middleName Data Type: Alphanumeric Options: L|
(note that the last line is "L| " - capital L, vertical pipe, space, to generate a blend of populated and unpopulated middle initials.)
Expected result: No middleName attribute would be created in the LDIF export when the output is empty.
Actual LDIF result:
dn:CN=Adara Orr,CN=Users,DC=corp,DC=foo,DC=bar,DC=com givenName:Adara middleName: sn:Orr CN:Adara Orr sAMAccountName:aorr uid:aorr objectClass:organizationalPerson objectClass:person objectClass:top objectClass:user accountExpires:9223372036854775807 c:DE
Error caused when imported to LDAP directory:
#!DATE 2020-04-25T22:38:54.116 #!ERROR [LDAP: error code 21 - Element middleName has empty attribute in ldb message (CN=Adara Orr,CN=Users,DC=corp,DC=foo,DC=bar,DC=com)!] dn: CN=Adara Orr,CN=Users,DC=corp,DC=foo,DC=bar,DC=com changetype: add