From f85716be45a0cd47085c978744a6276fe189175e Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 19 Feb 2022 12:06:29 +0000 Subject: [PATCH] HTTP proxy: accept Digest algorithm name as a quoted string. FreeProxy sends 'algorithm="MD5"' instead of 'algorithm=MD5.' I'm actually not sure whether that's legal by RFC 7616, but it's certainly no trouble to parse if we see it. With all these changes, PuTTY now _can_ successfully make connections through FreeProxy again, whether it's in Basic or Digest mode. --- proxy/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/http.c b/proxy/http.c index d4797171..0738e37d 100644 --- a/proxy/http.c +++ b/proxy/http.c @@ -325,7 +325,7 @@ static HttpAuthDetails *parse_http_auth_header(HttpProxyNegotiator *s) d->hash_username = !stricmp(s->token->s, "true"); } else if (!stricmp(s->token->s, "algorithm")) { if (!get_separator(s, '=') || - !get_token(s)) + (!get_token(s) && !get_quoted_string(s))) return auth_error(d, "parse error in Digest algorithm " "field"); bool found = false;