Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: romuald.gandon [...] soprasteria.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.33
Fixed in: 0.49



CC: Baye Philippe <philippe.baye [...] soprasteria.com>
Subject: [ldifsort.pl] Don't sort if #
Date: Mon, 21 Dec 2015 10:13:08 +0000
To: "bug-perl-ldap [...] rt.cpan.org" <bug-perl-ldap [...] rt.cpan.org>
From: Gandon Romuald <romuald.gandon [...] soprasteria.com>
Hello, I have a problem with ldifsort.pl script when LDIF files contain the sharp character "#", the dn containing "#" aren't sorted. This problem don't print message. Example lines: dn: uid=ABC#DEFG#1.2.3.4.,ou=data uid: ABC#DEFG#1.2.3.4. My usage is: ldifsort.pl -k dn -d file.ldif My temporary solution is to escape "#": sed -e 's/\([^\\]\)#/\1\\#/g' System information: rpm -qf /usr/share/doc/perl-LDAP-0.33/contrib/ldifsort.pl perl-LDAP-0.33-4.el5_8 perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi uname -a Linux 2.6.18-398.el5 #1 SMP Tue Sep 16 20:50:52 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux cat /etc/redhat-release CentOS release 5.11 (Final) head /usr/share/doc/perl-LDAP-0.33/contrib/ldifsort.pl #! /usr/bin/perl # $Id: ldifsort.pl,v 1.9 2005/04/03 20:20:24 subbarao Exp $ Thanks for this library, Regards, Romuald Gandon
Hi, On Mon Dec 21 05:13:23 2015, romuald.gandon@soprasteria.com wrote: Show quoted text
> I have a problem with ldifsort.pl script when LDIF files contain the > sharp character "#", the dn containing "#" aren't sorted. > This problem don't print message. > > Example lines: > dn: uid=ABC#DEFG#1.2.3.4.,ou=data > uid: ABC#DEFG#1.2.3.4. > > My usage is: > ldifsort.pl -k dn -d file.ldif > > My temporary solution is to escape "#": > sed -e 's/\([^\\]\)#/\1\\#/g' > > System information: > > rpm -qf /usr/share/doc/perl-LDAP-0.33/contrib/ldifsort.pl > perl-LDAP-0.33-4.el5_8 > > perl -v > This is perl, v5.8.8 built for x86_64-linux-thread-multi > > uname -a > Linux 2.6.18-398.el5 #1 SMP Tue Sep 16 20:50:52 EDT 2014 x86_64 x86_64 > x86_64 GNU/Linux > > cat /etc/redhat-release > CentOS release 5.11 (Final) > > head /usr/share/doc/perl-LDAP-0.33/contrib/ldifsort.pl > #! /usr/bin/perl > # $Id: ldifsort.pl,v 1.9 2005/04/03 20:20:24 subbarao Exp $
I cannot reproduce the issue with current perl-ldap. In ancient versions of perl-ldap the functions for parsing and canonicalizing the DN [Net::LDAP::Util's ldap_explode_dn and canonical_dn] were a bit sloppy w.r.t the use of '#' in attribute values. This has been fixed to exactly match the RFC requirements in perl-ldap 0.49, released in Oct 2012. Current version is 0.65. Version 0.33 of perl-ldap is really ancient: please upgrade. Closing the bug. Best Peter