mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/webrick/httpauth/digestauth.rb: use Base64.encode64 to
avoid warnings. [webrickja:128] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cfc8755faf
commit
77d3f40c90
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Nov 3 22:24:17 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* lib/webrick/httpauth/digestauth.rb: use Base64.encode64 to
|
||||
avoid warnings.
|
||||
|
||||
Wed Nov 3 17:19:59 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* array.c (rb_ary_uniq_bang): do not push frozen string from hash
|
||||
|
|
|
@ -254,7 +254,7 @@ module WEBrick
|
|||
def generate_next_nonce(req)
|
||||
now = "%012d" % req.request_time.to_i
|
||||
pk = hexdigest(now, @instance_key)[0,32]
|
||||
nonce = encode64(now + ":" + pk).chop # it has 60 length of chars.
|
||||
nonce = Base64.encode64(now + ":" + pk).chop # it has 60 length of chars.
|
||||
nonce
|
||||
end
|
||||
|
||||
|
@ -262,7 +262,7 @@ module WEBrick
|
|||
username = auth_req['username']
|
||||
nonce = auth_req['nonce']
|
||||
|
||||
pub_time, pk = decode64(nonce).split(":", 2)
|
||||
pub_time, pk = Base64.decode64(nonce).split(":", 2)
|
||||
if (!pub_time || !pk)
|
||||
error("%s: empty nonce is given", username)
|
||||
return false
|
||||
|
|
Loading…
Reference in a new issue