diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-01-09 22:38:22 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-01-09 22:41:51 +0100 |
commit | 0885b26005fefa62adfd3b7e52f7209693462d9f (patch) | |
tree | 81c26d33f5a4cfe53a1197baa94184bab3d73bc7 /lib/ldap.c | |
parent | dbde76bdd6018ba68bf7192a514e4048f014cea3 (diff) | |
download | curl-bagder/ldap-url-malformat.tar.gz |
ldap: return CURLE_URL_MALFORMAT for bad URLbagder/ldap-url-malformat
For consistency, use the same return code for URL malformats,
independently of what scheme that is used. Previously this would return
CURLE_LDAP_INVALID_URL, but starting now that error cannot be returned.
Closes #8170
Diffstat (limited to 'lib/ldap.c')
-rw-r--r-- | lib/ldap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ldap.c b/lib/ldap.c index 3154db5cf..3e3562078 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -306,8 +306,8 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) rc = _ldap_url_parse(data, conn, &ludp); #endif if(rc) { - failf(data, "LDAP local: %s", ldap_err2string(rc)); - result = CURLE_LDAP_INVALID_URL; + failf(data, "Bad LDAP URL: %s", ldap_err2string(rc)); + result = CURLE_URL_MALFORMAT; goto quit; } |