mirror of
https://github.com/curl/curl.git
synced 2026-07-31 11:38:06 +03:00
ldap: support empty username and password
Prior to this change an empty username or password was passed to the
LDAP bind function as NULL instead of an empty string.
Regression since 8f71d0fd.
Reported-by: Yoshiro Yoneya
Fixes https://github.com/curl/curl/issues/22162
Closes https://github.com/curl/curl/pull/22196
This commit is contained in:
parent
a7f82509e4
commit
c4fe0c7b9f
1 changed files with 2 additions and 4 deletions
|
|
@ -282,10 +282,8 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done)
|
|||
#else
|
||||
char *host = NULL;
|
||||
#endif
|
||||
const char *user = Curl_creds_has_user(data->state.creds) ?
|
||||
data->state.creds->user : NULL;
|
||||
const char *passwd = Curl_creds_has_passwd(data->state.creds) ?
|
||||
data->state.creds->passwd : NULL;
|
||||
const char *user = data->state.creds ? data->state.creds->user : NULL;
|
||||
const char *passwd = data->state.creds ? data->state.creds->passwd : NULL;
|
||||
struct ip_quadruple ipquad;
|
||||
bool is_ipv6;
|
||||
BerElement *ber = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue