Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ldap
    • Labels:
      None
    • Environment:
      not relevant

      Description

      RFC 2849 states that a ldif file must start with the 'version: 1' string. LdifParserImpl does accept files that don't respect this rule.

      It was marked Trivial as this is really not an issue : Microsoft(TM) ldifde.exe tool accept those kind of files (even worse : it does NOT accept files with a 'version: 1' string ...). I think that it should be an option, but at least, it should verify that the version number is '1', if present ! (p.5, par.1)

      BTW, RFC2849 is not very clear on this subject, and could be interpreted as "If <version-spec> is absent, ..." instead of "If version number is absent..."

        Activity

        Hide
        Emmanuel Lecharny added a comment -

        implemented and tested

        Show
        Emmanuel Lecharny added a comment - implemented and tested
        Hide
        Emmanuel Lecharny added a comment -

        The version default to 1 if the "version :" is absent from the file.

        Show
        Emmanuel Lecharny added a comment - The version default to 1 if the "version :" is absent from the file.
        Hide
        Emmanuel Lecharny added a comment -

        A better solution will be to accept ldif files without a "version:" as being version 1 files.

        Show
        Emmanuel Lecharny added a comment - A better solution will be to accept ldif files without a "version:" as being version 1 files.
        Hide
        Emmanuel Lecharny added a comment -

        Bug-> Improvment

        Show
        Emmanuel Lecharny added a comment - Bug-> Improvment
        Hide
        Vincent Tence added a comment -

        Changed from bug to improvment as suggested by Emmanuel.

        Show
        Vincent Tence added a comment - Changed from bug to improvment as suggested by Emmanuel.
        Hide
        Emmanuel Lecharny added a comment -

        Yes, you're right, it may be seen as optionnal. I don't know however if it's a good politic to do so, as the ldif file format could change sooner or later. May be something acceptable would be at least to log a warning, but still accept the file.

        So with the number : even if it's not '1', we may still accept the file, and log a message.

        I don't remember if LDIFDE extract a version number out of AD, so in this case, it's really important to accept a ldif file without any version number : it will allow a M$ "compatibility".

        This entry could be changed from "Bug" to "Improvment".

        Show
        Emmanuel Lecharny added a comment - Yes, you're right, it may be seen as optionnal. I don't know however if it's a good politic to do so, as the ldif file format could change sooner or later. May be something acceptable would be at least to log a warning, but still accept the file. So with the number : even if it's not '1', we may still accept the file, and log a message. I don't remember if LDIFDE extract a version number out of AD, so in this case, it's really important to accept a ldif file without any version number : it will allow a M$ "compatibility". This entry could be changed from "Bug" to "Improvment".
        Hide
        karan singh malhi added a comment -

        I think the version number is optional. look at the text below, i have taken it straight out of the RFC, it clearly states that if the version number is missing, then implementation has an option to treat it as an older format
        1) For the LDIF format described in this document, the version
        number MUST be "1". If the version number is absent,
        implementations MAY choose to interpret the contents as an
        older LDIF file format, supported by the University of
        Michigan ldap-3.3 implementation [8].

        Show
        karan singh malhi added a comment - I think the version number is optional. look at the text below, i have taken it straight out of the RFC, it clearly states that if the version number is missing, then implementation has an option to treat it as an older format 1) For the LDIF format described in this document, the version number MUST be "1". If the version number is absent, implementations MAY choose to interpret the contents as an older LDIF file format, supported by the University of Michigan ldap-3.3 implementation [8] .
        Hide
        Alex Karasulu added a comment -

        Nice! Sounds like you've got some serious experience in LDAP. Funny I noticed the same ldifde.exe behavoir. With your help we can make sure we're much more compliant. Also I don't think we support modification operations other than adds in the ldif. This is something that must be looked into.

        You're more than welcome to tackle all this .

        Cheers,

        Alex

        P.S. Again pushing this to 0.8.1.

        Show
        Alex Karasulu added a comment - Nice! Sounds like you've got some serious experience in LDAP. Funny I noticed the same ldifde.exe behavoir. With your help we can make sure we're much more compliant. Also I don't think we support modification operations other than adds in the ldif. This is something that must be looked into. You're more than welcome to tackle all this . Cheers, Alex P.S. Again pushing this to 0.8.1.

          People

          • Assignee:
            Emmanuel Lecharny
            Reporter:
            Emmanuel Lecharny
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development