Hi,

On Tuesday 05 April 2005 18:10, Erik Ableson wrote:
> Except that we have run across a few instances of MIIS refusing to
> accept the Base64 encoded attribute content...  And there's no way to
> flag whether or not the content should be encoded...  Right now it auto
> encodes anything it sees as outside the acceptable character range, and
> the odd part is that MIIS that will accept the raw content (original
> ldif output) but after I run it through ldiffdiff which uses the
> LDIF.pm module, it's incapable of reading some of the encoded
> attributes.

It is not said that Net::LDAP::LDIF is the part with the problems.
It might as well be MIIS.

RFC 2849 (http://www.ietf.org/rfc/rfc2849.txt) states:

      4)  Any dn or rdn that contains characters other than those
          defined as "SAFE-UTF8-CHAR", or begins with a character other
          than those defined as "SAFE-INIT-UTF8-CHAR", above, MUST be
          base-64 encoded.  Other values MAY be base-64 encoded.  Any
          value that contains characters other than those defined as
          "SAFE-CHAR", or begins with a character other than those
          defined as "SAFE-INIT-CHAR", above, MUST be base-64 encoded.
          Other values MAY be base-64 encoded.

The interesting parts are the senctences containing MAY.
In my interpretation this says that an LDAP server must understand
Base64 encoded values even if it is not necessary for these values to be 
encoded.

On the other hand, not encoding vlaues that need to be encoded is against
the RFC.

Currently Net::LDAP::LDIF encodes Base64 if the output value matches
/(^[ :<]|[\x00-\x1f\x7f-\xff])/ which encodes a few values more than 
absolutely necessary, but prevents control characters from being written
to the file.

Can you find a minimal test case so that we can find out where exactly the 
problem is ?

CU
Peter

-- 
Peter Marschall
eMail: [EMAIL PROTECTED]

Reply via email to