Просмотр исходного кода

fixed bug when stale parameter appears but it's set to "false"

gilcu3 8 лет назад
Родитель
Сommit
b0c8361e76
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      psiphon/upstreamproxy/auth_digest.go

+ 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