1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

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.
This commit is contained in:
Simon Tatham 2022-02-19 12:06:29 +00:00
parent 6c754822bc
commit f85716be45

View File

@ -325,7 +325,7 @@ static HttpAuthDetails *parse_http_auth_header(HttpProxyNegotiator *s)
d->hash_username = !stricmp(s->token->s, "true"); d->hash_username = !stricmp(s->token->s, "true");
} else if (!stricmp(s->token->s, "algorithm")) { } else if (!stricmp(s->token->s, "algorithm")) {
if (!get_separator(s, '=') || if (!get_separator(s, '=') ||
!get_token(s)) (!get_token(s) && !get_quoted_string(s)))
return auth_error(d, "parse error in Digest algorithm " return auth_error(d, "parse error in Digest algorithm "
"field"); "field");
bool found = false; bool found = false;