Skip Menu |

This queue is for tickets about the perl-ldap CPAN distribution.

Report information
The Basics
Id: 73202
Status: resolved
Priority: 0/
Queue: perl-ldap

People
Owner: Nobody in particular
Requestors: MEDINA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in:
  • 0.18
  • 0.43
Fixed in: 0.54



Subject: Net::LDAP::LDIF compat with non-standard tools
Net::LDAP::LDIF seems create RFC 2849 LDIF well enough. Some tools impose additional restrictions, choking on things like trailing white-space characters in attribute values. It would be helpful if Net::LDAP::LDIF had additional flexibility to deal with these common, but non-standard tools. For a vendor example, http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frzahy%2Frzahymodifystyle.htm
Just another example, claiming that trailing whitespace is in fact the correct behavior, http://sourceforge.net/projects/ldap-sdk/forums/forum/1001257/topic/4553430 Hence, a knob in the Net::LDAP::LDIF to deal with this is desirable. On Mon Dec 12 11:25:32 2011, MEDINA wrote: Show quoted text
> Net::LDAP::LDIF seems create RFC 2849 LDIF well enough. Some tools > impose additional restrictions, choking on things like trailing > white-space characters in attribute values. > > It would be helpful if Net::LDAP::LDIF had additional flexibility to > deal with these common, but non-standard tools. > > For a vendor example, >
http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frzahy%2Frzahymodifystyle.htm
One patch suggestion: replace the regexp 406 if ($v =~ /(^[ :<]|[\x00-\x1f\x7f-\xff])/) { 407 require MIME::Base64; 408 $ln .= ":: " . MIME::Base64::encode($v,""); 409 } with: 406 if ($v =~ /(^[ :<]|[\x00-\x1f\x7f-\xff]|\s$)/) { (from perl-ldap-0.43 Net::LDAP::LDIF)
Subject: Re: [rt.cpan.org #73202] Net::LDAP::LDIF compat with non-standard tools
Date: Mon, 12 Dec 2011 13:00:06 -0600
To: bug-perl-ldap [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
If the MIME::Base64::encode works so the the trailing spaces are preserved, then I would rather do that than modify the data. Have you actually tested it ? Graham.
On Mon Dec 12 14:00:19 2011, gbarr@pobox.com wrote: Show quoted text
> If the MIME::Base64::encode works so the the trailing spaces are > preserved, then I would rather do that than modify the data.
Yes, encoding works. Show quoted text
> Have you actually tested it ?
Yes, that regexp will catch the entries will the trailing white-space so the necessary encoding is done. I'm not sure if this should always happen or if it should be an option (custom dn / value regexp to be passed in?) for when one knows the LDIF will be going to a non-standard reader.