diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/net/ftp.rb | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Thu Aug 7 20:52:08 2008 Shugo Maeda <shugo@ruby-lang.org> + + * lib/net/ftp.rb (login): raise FTPReplyError if passwd or acct + is not supplied. fixed [ruby-core:18058]. + Thu Aug 7 18:01:44 2008 Akinori MUSHA <knu@iDaemons.org> * misc/ruby-mode.el (ruby-imenu-create-index-in-block): Fix the diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 436ccd937f..e0aa6f6adb 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -396,9 +396,11 @@ module Net synchronize do resp = sendcmd('USER ' + user) if resp[0] == ?3 + raise FTPReplyError, resp if passwd.nil? resp = sendcmd('PASS ' + passwd) end if resp[0] == ?3 + raise FTPReplyError, resp if acct.nil? resp = sendcmd('ACCT ' + acct) end end |