Permalink
Browse files

Minor tweaks

darcs-hash:20070403205913-5d7f7-1a97dde96ab1faac90eaa00f547ac4c3fdf51069.gz
  • Loading branch information...
1 parent 9191ff3 commit cbfe6717e30557e10aa8a68155a2bf022147b7da @tim tim committed Apr 3, 2007
Showing with 6 additions and 2 deletions.
  1. +3 −0 lib/rack/auth/abstract/handler.rb
  2. +3 −2 lib/rack/auth/digest/md5.rb
@@ -12,6 +12,9 @@ def initialize(app, &authenticator)
@app, @authenticator = app, authenticator
end
+
+ private
+
def unauthorized(www_authenticate = challenge)
return [ 401, { 'WWW-Authenticate' => www_authenticate.to_s }, [] ]
end
@@ -113,8 +113,9 @@ def A2(auth)
end
def digest(auth, password)
- KD passwords_hashed? ? password : H(A1(auth, password)),
- [ auth.nonce, auth.nc, auth.cnonce, QOP, H(A2(auth)) ] * ':'
+ password_hash = passwords_hashed? ? password : H(A1(auth, password))
+
+ KD(password_hash, [ auth.nonce, auth.nc, auth.cnonce, QOP, H(A2(auth)) ] * ':')
end
end

0 comments on commit cbfe671

Please sign in to comment.