http: fix bug in ntlm_allow=1 handling#6136
Open
mjcheetham wants to merge 1 commit intogit-for-windows:mainfrom
Open
http: fix bug in ntlm_allow=1 handling#6136mjcheetham wants to merge 1 commit intogit-for-windows:mainfrom
mjcheetham wants to merge 1 commit intogit-for-windows:mainfrom
Conversation
In 816db62 (credential: advertise NTLM suppression and allow helpers to re-enable, 2026-02-09), Git learned to advertise that NTLM authentication was suppressed to credential helpers. It also introduced a way to allow credential helpers to opt-back-in to NTLM authentication via the `ntlm_allow=1` credential protocol flag. There is a bug in the logic of 816db62 that means we are responding to the `ntlm_allow=1` signal too late in the auth retry codepath; we've already made the second-attempt request! Move adding of NTLM as a valid auth method to `http_request_reauth` right after the credential helper is consulted following the first request, but (now) before we made the second request. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
derrickstolee
approved these changes
Mar 20, 2026
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 free
to 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.
In 816db62 (credential: advertise NTLM suppression and allow helpers to re-enable, 2026-02-09), Git learned to advertise that NTLM authentication was suppressed to credential helpers. It also introduced a way to allow credential helpers to opt-back-in to NTLM authentication via the
ntlm_allow=1credential protocol flag.There is a bug in the logic of 816db62 that means we are responding to the
ntlm_allow=1signal too late in the auth retry codepath; we've already made the second-attempt request!Move adding of NTLM as a valid auth method to
http_request_reauthright after the credential helper is consulted following the first request, but (now) before we made the second request.