Browse Source

Merge pull request #436 from gilcu3/master

fixed bug when stale parameter appears but it's set to "false"
Rod Hynes 8 years ago
parent
commit
fd717e05a4
2 changed files with 10 additions and 1 deletions
  1. 9 0
      contributors/gilcu3.md
  2. 1 1
      psiphon/upstreamproxy/auth_digest.go

+ 9 - 0
contributors/gilcu3.md

@@ -0,0 +1,9 @@
+2017-12-21
+
+I hereby agree to the terms of the "Psiphon Individual Contributor License Agreement", with MD5 checksum 83d54c85a43e0c0f416758779ea6740a.
+
+I furthermore declare that I am authorized and able to make this agreement and sign this declaration.
+
+Signed,
+
+Reynaldo Gil https://github.com/gilcu3

+ 1 - 1
psiphon/upstreamproxy/auth_digest.go

@@ -158,7 +158,7 @@ func (a *DigestHttpAuthenticator) Authenticate(req *http.Request, resp *http.Res
 
 	algorithm := digestParams["algorithm"]
 
-	if _, ok := digestParams["stale"]; ok {
+	if stale, ok := digestParams["stale"]; ok && stale == "true" {
 		// Server indicated that the nonce is stale
 		// Reset auth cache and state
 		a.digestHeaders = nil