1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

krb5_gssapi: Only process challenge when present

This wouldn't cause a problem because of the way the function is called,
but prior to this change, we were processing the challenge message when
the credentials were NULL rather than when the challenge message was
populated.

This also brings this part of the Kerberos 5 code in line with the
Negotiate code.
This commit is contained in:
Steve Holme 2016-04-03 17:17:20 +01:00
parent 73f1096335
commit 156b8287a7

View File

@ -113,9 +113,9 @@ CURLcode Curl_auth_create_gssapi_user_message(struct SessionHandle *data,
free(spn); free(spn);
} }
if(krb5->context != GSS_C_NO_CONTEXT) { if(chlg64 && strlen(chlg64)) {
/* Decode the base-64 encoded challenge message */ /* Decode the base-64 encoded challenge message */
if(strlen(chlg64) && *chlg64 != '=') { if(*chlg64 != '=') {
result = Curl_base64_decode(chlg64, &chlg, &chlglen); result = Curl_base64_decode(chlg64, &chlg, &chlglen);
if(result) if(result)
return result; return result;