mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
aamine
* lib/net/smtp.rb: uses Digest::MD5 instead of MD5 (again). * lib/net/pop.rb: ditto. * lib/net/http.rb (HTTP#request): must pass block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9a697aeb95
commit
772678cb7a
8 changed files with 24 additions and 16 deletions
|
|
@ -1,3 +1,11 @@
|
|||
Fri Dec 7 19:20:44 2001 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* lib/net/smtp.rb: uses Digest::MD5 instead of MD5 (again).
|
||||
|
||||
* lib/net/pop.rb: ditto.
|
||||
|
||||
* lib/net/http.rb (HTTP#request): must pass block.
|
||||
|
||||
Fri Dec 7 18:47:54 2001 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* lib/net/smtp.rb: SMTP.new requires at least one arg.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
=begin
|
||||
|
||||
= net/http.rb version 1.1.36
|
||||
= net/http.rb version 1.1.37
|
||||
|
||||
== このライブラリについて
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
=begin
|
||||
|
||||
= net/pop.rb version 1.1.36
|
||||
= net/pop.rb version 1.1.37
|
||||
|
||||
== このライブラリについて
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
=begin
|
||||
|
||||
= net/smtp.rb version 1.1.36
|
||||
= net/smtp.rb version 1.1.37
|
||||
|
||||
== このライブラリについて
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
=begin
|
||||
|
||||
= net/http.rb version 1.1.36
|
||||
= net/http.rb version 1.1.37
|
||||
|
||||
Copyright (c) 1999-2001 Yukihiro Matsumoto
|
||||
|
||||
|
|
@ -591,11 +591,11 @@ module Net
|
|||
define_http_method_interface :Post, true, true
|
||||
define_http_method_interface :Put, false, true
|
||||
|
||||
def request( req, body = nil )
|
||||
def request( req, body = nil, &block )
|
||||
unless active? then
|
||||
start {
|
||||
req['connection'] = 'close'
|
||||
return request(req, body)
|
||||
return request(req, body, &block)
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
=begin
|
||||
|
||||
= net/pop.rb version 1.1.36
|
||||
= net/pop.rb version 1.1.37
|
||||
|
||||
Copyright (c) 1999-2001 Yukihiro Matsumoto
|
||||
|
||||
|
|
@ -287,7 +287,7 @@ A class of mail which exists on POP server.
|
|||
=end
|
||||
|
||||
require 'net/protocol'
|
||||
require 'md5'
|
||||
require 'digest/md5'
|
||||
|
||||
|
||||
module Net
|
||||
|
|
@ -570,7 +570,7 @@ module Net
|
|||
critical {
|
||||
@socket.writeline sprintf( 'APOP %s %s',
|
||||
account,
|
||||
MD5.new(@stamp + pass).hexdigest )
|
||||
Digest::MD5.hexdigest(@stamp + pass) )
|
||||
check_reply_auth
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
=begin
|
||||
|
||||
= net/protocol.rb version 1.1.36
|
||||
= net/protocol.rb version 1.1.37
|
||||
|
||||
Copyright (c) 1999-2001 Yukihiro Matsumoto
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ module Net
|
|||
|
||||
class Protocol
|
||||
|
||||
Version = '1.1.36'
|
||||
Version = '1.1.37'
|
||||
|
||||
class << self
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
=begin
|
||||
|
||||
= net/smtp.rb version 1.1.36
|
||||
= net/smtp.rb version 1.1.37
|
||||
|
||||
Copyright (c) 1999-2001 Yukihiro Matsumoto
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ SMTP objects raise these exceptions:
|
|||
=end
|
||||
|
||||
require 'net/protocol'
|
||||
require 'md5'
|
||||
require 'digest/md5'
|
||||
|
||||
|
||||
module Net
|
||||
|
|
@ -317,7 +317,7 @@ module Net
|
|||
critical {
|
||||
rep = getok( 'AUTH CRAM-MD5', ContinueCode )
|
||||
challenge = rep.msg.split(' ')[1].unpack('m')[0]
|
||||
secret = MD5.new( secret ).digest if secret.size > 64
|
||||
secret = Digest::MD5.digest( secret ) if secret.size > 64
|
||||
|
||||
isecret = secret + "\0" * (64 - secret.size)
|
||||
osecret = isecret.dup
|
||||
|
|
@ -325,8 +325,8 @@ module Net
|
|||
isecret[i] ^= 0x36
|
||||
osecret[i] ^= 0x5c
|
||||
end
|
||||
tmp = MD5.new( isecret + challenge ).digest
|
||||
tmp = MD5.new( osecret + tmp ).hexdigest
|
||||
tmp = Digest::MD5.digest( isecret + challenge )
|
||||
tmp = Digest::MD5.hexdigest( osecret + tmp )
|
||||
|
||||
getok [user + ' ' + tmp].pack('m').chomp
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue