about summary refs log tree commit
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2015-02-05 13:51:04 +0000
committerSteve Hay <steve.m.hay@googlemail.com>2015-02-05 13:51:04 +0000
commit460de122b97a64ec6947bb52d11bc5a0d96f4a26 (patch)
treefc746c36a6e3d0e8db91b964d55d2285fb21c8b5
parent21148d928e1ba276fb666a1b3d53003ae99bc81a (diff)
downloadperl-libnet-460de122b97a64ec6947bb52d11bc5a0d96f4a26.tar.gz
Fix Net::FTP authorize() method
Patch by Troy Loveday from CPAN RT#48532.
-rw-r--r--Changes6
-rw-r--r--lib/Net/FTP.pm2
2 files changed, 6 insertions, 2 deletions
diff --git a/Changes b/Changes
index 1bf112f..ab564d0 100644
--- a/Changes
+++ b/Changes
@@ -2,9 +2,13 @@ Revision history for Perl distribution libnet
 
 3.06 Development
 
+    - Fixed Net::FTP authorize() method, which incorrectly interpreted the
+      return value of the _RESP() method and falsely reported a failure.  [Troy
+      Loveday, CPAN RT#48532]
+
     - Added optional SendHello argument to Net::SMTP->new() to allow preventing
       the EHLO/HELO command from being automatically sent by the constructor.
-      [PR#13, Danil Onishchenko]
+      [Danil Onishchenko, PR#13]
 
 3.05 2015-01-12
 
diff --git a/lib/Net/FTP.pm b/lib/Net/FTP.pm
index 38e1fdd..36d89bc 100644
--- a/lib/Net/FTP.pm
+++ b/lib/Net/FTP.pm
@@ -452,7 +452,7 @@ sub authorize {
 
   my $ok = $ftp->_AUTH($auth || "");
 
-  $ok = $ftp->_RESP($resp || "")
+  return $ftp->_RESP($resp || "")
     if ($ok == CMD_MORE);
 
   $ok == CMD_OK;