CC: | tech [...] sannet.ne.jp |
Subject: | bug report about starttls disconnecting |
Date: | Wed, 29 May 2013 10:15:31 +0900 |
To: | bug-Net-POP3S [...] rt.cpan.org |
From: | Tanaka Daisuke <dtanaka [...] sannet.ad.jp> |
Dear Sir/Madam:
Hi, My name is Daisuke Tanaka, and I use `Net::POP3S' package of CPAN.
I found a bug of `Net::POP3S' at using `STARTTLS' feature.
It is that a `STARTTLS' connection disconnects after reciving a response
of first `CAPA' command, because an error occurred that `new()' method has
returned `unref' value.
Other features are very fine.
My Environment is following:
Distribution: Net-POP3S-0.03
perl -v: This is perl 5, version 16, subversion 2 (v5.16.2) built for sun4-solaris
uname -a: SunOS signup1 5.11 11.1 sun4v sparc sun4v Solaris
And, I made a patch for this bug.
The patch is following:
----------------------------------------------------------------------
*** POP3S.pm.orig 2013-05-29 09:32:43.503303838 +0900
--- POP3S.pm 2013-05-29 09:30:16.041221309 +0900
***************
*** 103,109 ****
if (defined($ssl) && $ssl =~ /starttls|stls/i ) {
my $capa;
($capa = $obj->capa
! and $capa->{STLS}
and ($obj->command('STLS')->response() == CMD_OK)
and $obj->ssl_start(\%ssl_args))
or do {
--- 103,109 ----
if (defined($ssl) && $ssl =~ /starttls|stls/i ) {
my $capa;
($capa = $obj->capa
! and exists $capa->{STLS}
and ($obj->command('STLS')->response() == CMD_OK)
and $obj->ssl_start(\%ssl_args))
or do {
----------------------------------------------------------------------
Thanks,
--
Tanaka Daisuke <dtanaka@sannet.ad.jp>
SANNET Business Unit, Operative Technology Team,
SANYO Information Technology Solutions Co., Ltd.