We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e761df5 commit 2d6a61bCopy full SHA for 2d6a61b
src/transports/auth_negotiate.c
@@ -128,11 +128,13 @@ static int negotiate_next_token(
128
129
challenge_len = ctx->challenge ? strlen(ctx->challenge) : 0;
130
131
- if (challenge_len < 9) {
132
- git_error_set(GIT_ERROR_NET, "no negotiate challenge sent from server");
+ if (challenge_len < 9 || memcmp(ctx->challenge, "Negotiate", 9) != 0) {
+ git_error_set(GIT_ERROR_NET, "server did not request negotiate");
133
error = -1;
134
goto done;
135
- } else if (challenge_len > 9) {
+ }
136
+
137
+ if (challenge_len > 9) {
138
if (git_buf_decode_base64(&input_buf,
139
ctx->challenge + 10, challenge_len - 10) < 0) {
140
git_error_set(GIT_ERROR_NET, "invalid negotiate challenge from server");
0 commit comments