You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2015/09/24 17:01:04 UTC
[jira] [Resolved] (DIRAPI-248) LDIF Reader - changetype shouldn't
need a space
[ https://issues.apache.org/jira/browse/DIRAPI-248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny resolved DIRAPI-248.
--------------------------------------
Resolution: Fixed
Fixed with http://svn.apache.org/r1702323
> LDIF Reader - changetype shouldn't need a space
> -----------------------------------------------
>
> Key: DIRAPI-248
> URL: https://issues.apache.org/jira/browse/DIRAPI-248
> Project: Directory Client API
> Issue Type: Bug
> Affects Versions: 1.0.0-M31
> Reporter: Dan Ertman
> Priority: Minor
>
> RFC 2849 has a BNF for LDIF files. In it, the changetype is specified as:
> changerecord = "changetype:" FILL
> (change-add / change-delete /
> change-modify / change-moddn)
> and FILL is:
> FILL = *SPACE
> which means 0 or more spaces.
> But, Apache's LdifReader requires at least one space - see line 545:
> String modOp = Strings.trim( line.substring( "changetype:".length() + 1 ) );
> This generally works out OK, most directories output a single space after the colon anyway. But, when I tried hand-creating a file today, it reported all of my modifies as add due to this bug, and it wasn't clear to me why.
> Here is a test that illustrates the problem:
> dn:cn=moo
> changetype:modify
> add:fullName
> fullName:Moo The Cow
> -
> This fails with an error, even though it is correct according to the spec.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)