1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/net/smtp.rb (Net::SMTP::auth_cram_md5): use ord to retrieve

bytes from strings.  a patch from WATANABE Tetsuya
  <Tetsuya.WATANABE at nifty.com>.  [ruby-dev:29240]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-08-09 07:56:30 +00:00
parent 7e5324e6c1
commit 2ff719fcd1
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,9 @@
Wed Aug 9 16:53:28 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/net/smtp.rb (Net::SMTP::auth_cram_md5): use ord to retrieve
bytes from strings. a patch from WATANABE Tetsuya
<Tetsuya.WATANABE at nifty.com>. [ruby-dev:29240]
Tue Aug 8 23:49:06 2006 Yukihiro Matsumoto <matz@ruby-lang.org> Tue Aug 8 23:49:06 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/irb/extend-command.rb (IRB::ExtendCommandBundle): pacify * lib/irb/extend-command.rb (IRB::ExtendCommandBundle): pacify

View file

@ -699,8 +699,10 @@ module Net
isecret = secret + "\0" * (64 - secret.size) isecret = secret + "\0" * (64 - secret.size)
osecret = isecret.dup osecret = isecret.dup
0.upto(63) do |i| 0.upto(63) do |i|
isecret[i] ^= 0x36 c = isecret[i].ord ^ 0x36
osecret[i] ^= 0x5c isecret[i] = c.chr
c = osecret[i].ord ^ 0x5c
osecret[i] = c.chr
end end
tmp = Digest::MD5.digest(isecret + challenge) tmp = Digest::MD5.digest(isecret + challenge)
tmp = Digest::MD5.hexdigest(osecret + tmp) tmp = Digest::MD5.hexdigest(osecret + tmp)