Uh oh!
There was an error while loading. Please reload this page.
fail SCRAM exchange on invalid ServerSignature - #2235
Merged
hyperxpro merged 1 commit intoJul 16, 2026
Conversation
hyperxpro
approved these changes
Jul 16, 2026
Uh oh!
There was an error while loading. Please reload this page.
pullBot
pushed a commit
to Mu-L/async-http-client
that referenced
this pull request
Aug 9, 2026
Motivation: On a Digest Authentication-Info rspauth mismatch the client only logged a warning and still delivered the response as an authenticated success, so a server that could not prove knowledge of the shared secret was accepted. This mirrors the SCRAM ServerSignature gap already fixed in AsyncHttpClient#2235. The expected rspauth was also computed from future.getRealm().getCnonce(), but that realm is rebuilt for header emission and regenerates its cnonce, so the expected value used a cnonce that was never sent and a correct server would never have matched. Modification: - Verify rspauth against the cnonce actually sent, parsed from the request's own Authorization/Proxy-Authorization header. AuthenticatorUtils.computeRspAuth now accepts an explicit cnonce; the existing no-arg overload is unchanged. - On a present-but-invalid rspauth, abort the request via requestSender.abort and return true through exitAfterIntercept so the response is not delivered, exactly as processScramAuthenticationInfo does. An absent Authentication-Info header stays warn-only, as it may travel in chunked trailers. Result: A Digest mutual-auth exchange with a corrupted rspauth now fails with an ExecutionException; a valid rspauth is accepted. Added DigestMutualAuthTest; existing Digest and SCRAM tests are unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Abort the request when the ServerSignature is present but invalid or unparseable, for both the origin and proxy SCRAM paths. A missing header stays warn-only, since it may legitimately arrive in chunked trailers that AHC does not read. Added a regression test that drives a full handshake and returns a corrupted ServerSignature.