mirror of
https://github.com/curl/curl.git
synced 2026-08-26 02:43:31 +03:00
openldap: handle Curl_sasl_continue() returns better
Similar to how it gets treated already in other protocol handlers.
Follow-up to eeca818b1e
Reported-by: Eunsoo Kim
Closes #22213
This commit is contained in:
parent
df350dd0d8
commit
ea71c3b6b6
1 changed files with 13 additions and 2 deletions
|
|
@ -791,8 +791,19 @@ static CURLcode oldap_state_sasl_resp(struct Curl_easy *data,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
result = Curl_sasl_continue(&li->sasl, data, code, &progress);
|
result = Curl_sasl_continue(&li->sasl, data, code, &progress);
|
||||||
if(!result && progress != SASL_INPROGRESS)
|
if(!result) {
|
||||||
oldap_state(data, li, OLDAP_STOP);
|
switch(progress) {
|
||||||
|
case SASL_DONE:
|
||||||
|
oldap_state(data, li, OLDAP_STOP); /* Authenticated */
|
||||||
|
break;
|
||||||
|
case SASL_IDLE: /* No mechanism left after cancellation */
|
||||||
|
failf(data, "Authentication cancelled");
|
||||||
|
result = CURLE_LOGIN_DENIED;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(li->servercred)
|
if(li->servercred)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue