From 48de8bab55e619fab15501f88f9d1c61e1347830 Mon Sep 17 00:00:00 2001 From: Krzysztof Rybka Date: Wed, 5 Jun 2019 15:15:55 +0200 Subject: Interpolate A1 args --- lib/rack/auth/digest/md5.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rack/auth/digest/md5.rb b/lib/rack/auth/digest/md5.rb index ec6d8748..9db6a072 100644 --- a/lib/rack/auth/digest/md5.rb +++ b/lib/rack/auth/digest/md5.rb @@ -112,7 +112,7 @@ module Rack end def A1(auth, password) - [ auth.username, auth.realm, password ] * ':' + "#{auth.username}:#{auth.realm}:#{password}" end def A2(auth) -- cgit v1.2.1 From 0293f3e011aaf878bfed48c3cf715e8d78f4f6c6 Mon Sep 17 00:00:00 2001 From: Krzysztof Rybka Date: Wed, 5 Jun 2019 15:17:58 +0200 Subject: Interpolate KD args --- lib/rack/auth/digest/md5.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rack/auth/digest/md5.rb b/lib/rack/auth/digest/md5.rb index 9db6a072..118121e4 100644 --- a/lib/rack/auth/digest/md5.rb +++ b/lib/rack/auth/digest/md5.rb @@ -108,7 +108,7 @@ module Rack alias :H :md5 def KD(secret, data) - H([secret, data] * ':') + H "#{secret}:#{data}" end def A1(auth, password) -- cgit v1.2.1 From bd3f05411eef72d9acf174132e7a8bc232b313e5 Mon Sep 17 00:00:00 2001 From: Krzysztof Rybka Date: Wed, 5 Jun 2019 15:19:50 +0200 Subject: Interpolate A2 args --- lib/rack/auth/digest/md5.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rack/auth/digest/md5.rb b/lib/rack/auth/digest/md5.rb index 118121e4..47675b51 100644 --- a/lib/rack/auth/digest/md5.rb +++ b/lib/rack/auth/digest/md5.rb @@ -116,7 +116,7 @@ module Rack end def A2(auth) - [ auth.method, auth.uri ] * ':' + "#{auth.method}:#{auth.uri}" end def digest(auth, password) -- cgit v1.2.1 From abad221e43c21e0fa2cadc38ae0504e62b45186f Mon Sep 17 00:00:00 2001 From: Krzysztof Rybka Date: Wed, 5 Jun 2019 15:23:39 +0200 Subject: Interpolate digest args --- lib/rack/auth/digest/md5.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rack/auth/digest/md5.rb b/lib/rack/auth/digest/md5.rb index 47675b51..62bff984 100644 --- a/lib/rack/auth/digest/md5.rb +++ b/lib/rack/auth/digest/md5.rb @@ -122,7 +122,7 @@ module Rack def digest(auth, password) password_hash = passwords_hashed? ? password : H(A1(auth, password)) - KD(password_hash, [ auth.nonce, auth.nc, auth.cnonce, QOP, H(A2(auth)) ] * ':') + KD password_hash, "#{auth.nonce}:#{auth.nc}:#{auth.cnonce}:#{QOP}:#{H A2(auth)}" end end -- cgit v1.2.1