Skip Menu |

This queue is for tickets about the Net-Server-Mail CPAN distribution.

Report information
The Basics
Id: 34099
Status: resolved
Worked: 3 hours (180 min)
Priority: 0/
Queue: Net-Server-Mail

People
Owner: x.guimard [...] free.fr
Requestors: attila [...] netalfa.hu
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.01
Fixed in: 0.17



Subject: bug: duplicated leading dot
Date: Fri, 14 Mar 2008 21:25:06 +0100
To: bug-Net-Server-Mail [...] rt.cpan.org
From: bognár attila <attila [...] netalfa.hu>
Dear Xavier, I found a bug in Net-Server-Mail (http://search.cpan.org/~guimard/Net-Server-Mail/): when there is a leading dot in the message and it is duplicated for sending through smtp, this leading double dot is not deduplicated before passing it to the process subroutine. Yours, Attila
RT-Send-CC: attila [...] netalfa.hu
Le Ven. Mar. 14 16:25:43 2008, attila@netalfa.hu a écrit : Show quoted text
> Dear Xavier, > > I found a bug in Net-Server-Mail > (http://search.cpan.org/~guimard/Net-Server-Mail/): when there is a > leading dot in the message and it is duplicated for sending through > smtp, this leading double dot is not deduplicated before passing it to > the process subroutine. > > Yours, > > Attila
Hi, I found the bug: this is a RFC 2821 feature: points in the beginning of lines are duplicated. So Net-Server-Mail has to remove them. The regular expression is derived from Amavis. Thank you for your contribution.
diff -aburN Net-Server-Mail-0.16/lib/Net/Server/Mail/SMTP.pm Net-Server-Mail-0.16-new/lib/Net/Server/Mail/SMTP.pm --- Net-Server-Mail-0.16/lib/Net/Server/Mail/SMTP.pm 2007-05-26 09:48:35.000000000 +0200 +++ Net-Server-Mail-0.16-new/lib/Net/Server/Mail/SMTP.pm 2008-03-17 15:10:51.000000000 +0100 @@ -596,8 +596,10 @@ } # RFC 821 compliance. - ($data = "$self->{last_chunk}$data") =~ s/(\r?\n)\.\r?\n(QUIT\r?\n)?/$1/s; + ($data = "$self->{last_chunk}$data") =~ s/(\r?\n)\.\r?\n(QUIT\r?\n)?$/$1/s; $self->{_data} .= $data; + # RFC 2821 by the letter + $self->{_data} =~ s/^\.(.+\015\012)(?!\n)/$1/gm; return $self->data_finished($more_data); }
Fixed in version 0.17
Fixed in version 0.17
Fixed in version 0.17