Package: libmailtools-perl
Version: 2.04-1
Severity: normal

When run by a user without a fullname in the GECOS, such as:

user:x:1000:1000:,,,:/home/user:/bin/bash

Mail::Internet throws these errors:

Use of uninitialized value $name in pattern match (m//) at 
/usr/share/perl5/Mail/Internet.pm line 536.
Use of uninitialized value $name in sprintf at 
/usr/share/perl5/Mail/Internet.pm line 541.

The problem is these lines:

my $name = eval {local $SIG{__DIE__}; (getpwuid($>))[6]} || $ENV{NAME} ||"";

    while($name =~ s/\([^\(\)]*\)//) { 1; }
    
    # Strip extra fields: adduser-generated usernames have multiple comma
    # seperated fields, only the first of which should be used to prevent
    # accidental exposure of system-local information like phone numbers/
    # room numbers.
    $name = (split /,/, $name)[0];

    if($name =~ /[^\w\s]/)
    {   $name =~ s/"/\"/g;
        $name = '"' . $name . '"';
    }

    my $from = sprintf "%s <%s>", $name, mailaddress();

$name is set equal to the first field of the GECOS, which is assumed to be
non-null; when it is not defined, the errors are thrown.  I suppose there
should be tests for non-null values, and the code should only be executed for
defined fullnames.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.27-lizzie
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libmailtools-perl depends on:
ii  libtimedate-perl              1.1600-9   Time and date functions for Perl
ii  perl                          5.10.0-17  Larry Wall's Practical Extraction 
ii  perl-modules [libnet-perl]    5.10.0-17  Core Perl modules

libmailtools-perl recommends no packages.

libmailtools-perl suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to