Skip to content

Commit

Permalink
* lib/net/ftp.rb (login): raise FTPReplyError if passwd or acct
Browse files Browse the repository at this point in the history
  is not supplied.  fixed [ruby-core:18058].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
shugo committed Aug 7, 2008
1 parent 0ff8385 commit 16a2418
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Thu Aug 7 20:52:08 2008 Shugo Maeda <[email protected]>

* 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 <[email protected]>

* misc/ruby-mode.el (ruby-imenu-create-index-in-block): Fix the
Expand Down
2 changes: 2 additions & 0 deletions lib/net/ftp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,11 @@ def login(user = "anonymous", passwd = nil, acct = nil)
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
Expand Down

0 comments on commit 16a2418

Please sign in to comment.