mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/pop.rb: APOP did not work. [ruby-dev:20149]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
49cd34df39
commit
af9bb04a6f
2 changed files with 12 additions and 8 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Sun May 4 15:06:37 2003 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
|
* lib/net/pop.rb: APOP did not work. [ruby-dev:20149]
|
||||||
|
|
||||||
Sat May 3 00:58:53 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Sat May 3 00:58:53 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* class.c (rb_class_protected_instance_methods): now gives
|
* class.c (rb_class_protected_instance_methods): now gives
|
||||||
|
|
|
@ -448,7 +448,7 @@ module Net
|
||||||
end
|
end
|
||||||
|
|
||||||
def auth_only( account, password )
|
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) {
|
start(account, password) {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -511,14 +511,14 @@ module Net
|
||||||
alias active? started? # backward compatibility
|
alias active? started? # backward compatibility
|
||||||
|
|
||||||
def start( account, password )
|
def start( account, password )
|
||||||
raise IOError, 'already closed POP session' if @started
|
raise IOError, 'POP session already started' if @started
|
||||||
|
|
||||||
if block_given?
|
if block_given?
|
||||||
begin
|
begin
|
||||||
do_start account, password
|
do_start account, password
|
||||||
return yield(self)
|
return yield(self)
|
||||||
ensure
|
ensure
|
||||||
finish unless @started
|
finish if @started
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
do_start acount, password
|
do_start acount, password
|
||||||
|
@ -715,12 +715,12 @@ module Net
|
||||||
end
|
end
|
||||||
|
|
||||||
def apop( account, password )
|
def apop( account, password )
|
||||||
raise POPAuthenticationError.new('not APOP server; cannot login', nil)\
|
raise POPAuthenticationError, 'not APOP server; cannot login' \
|
||||||
unless @apop_stamp
|
unless @apop_stamp
|
||||||
check_response_auth(critical {
|
check_response_auth(critical {
|
||||||
get_reply('APOP %s %s',
|
get_response('APOP %s %s',
|
||||||
account,
|
account,
|
||||||
Digest::MD5.hexdigest(@apop_stamp + password))
|
Digest::MD5.hexdigest(@apop_stamp + password))
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -745,7 +745,7 @@ module Net
|
||||||
end
|
end
|
||||||
|
|
||||||
def rset
|
def rset
|
||||||
check_reply(critical { get_response 'RSET' })
|
check_response(critical { get_response 'RSET' })
|
||||||
end
|
end
|
||||||
|
|
||||||
def top( num, lines = 0, dest = '' )
|
def top( num, lines = 0, dest = '' )
|
||||||
|
|
Loading…
Reference in a new issue