Skip to content

Commit

Permalink
* lib/net/pop.rb: APOP did not work. [ruby-dev:20149]
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
aamine committed May 4, 2003
1 parent 49cd34d commit af9bb04
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Sun May 4 15:06:37 2003 Minero Aoki <[email protected]>

* lib/net/pop.rb: APOP did not work. [ruby-dev:20149]

Sat May 3 00:58:53 2003 Yukihiro Matsumoto <[email protected]>

* class.c (rb_class_protected_instance_methods): now gives
Expand Down
16 changes: 8 additions & 8 deletions lib/net/pop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def POP3.auth_only( address, port = nil,
end

def auth_only( account, password )
raise IOError, 'opening already opened POP session' if active?
raise IOError, 'opening already opened POP session' if started?
start(account, password) {
;
}
Expand Down Expand Up @@ -511,14 +511,14 @@ def started?
alias active? started? # backward compatibility

def start( account, password )
raise IOError, 'already closed POP session' if @started
raise IOError, 'POP session already started' if @started

if block_given?
begin
do_start account, password
return yield(self)
ensure
finish unless @started
finish if @started
end
else
do_start acount, password
Expand Down Expand Up @@ -715,12 +715,12 @@ def auth( account, password )
end

def apop( account, password )
raise POPAuthenticationError.new('not APOP server; cannot login', nil)\
raise POPAuthenticationError, 'not APOP server; cannot login' \
unless @apop_stamp
check_response_auth(critical {
get_reply('APOP %s %s',
account,
Digest::MD5.hexdigest(@apop_stamp + password))
get_response('APOP %s %s',
account,
Digest::MD5.hexdigest(@apop_stamp + password))
})
end

Expand All @@ -745,7 +745,7 @@ def stat
end

def rset
check_reply(critical { get_response 'RSET' })
check_response(critical { get_response 'RSET' })
end

def top( num, lines = 0, dest = '' )
Expand Down

0 comments on commit af9bb04

Please sign in to comment.