summaryrefslogtreecommitdiff
path: root/lib/ldap.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-06-23 16:13:50 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-06-25 09:57:18 +0200
commit31e53584db5879894809fbde5445aac7553ac3e2 (patch)
tree2cdf73cadcb2bbc0e7d9308ef46b9a4a7e44db23 /lib/ldap.c
parent646cc574f0b72723906224824a57cd37ee88e9df (diff)
downloadcurl-31e53584db5879894809fbde5445aac7553ac3e2.tar.gz
escape: make the URL decode able to reject only %00 bytes
... or all "control codes" or nothing. Assisted-by: Nicolas Sterchele
Diffstat (limited to 'lib/ldap.c')
-rw-r--r--lib/ldap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ldap.c b/lib/ldap.c
index 27306580d..512def659 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -883,7 +883,7 @@ static int _ldap_url_parse2(const struct connectdata *conn, LDAPURLDesc *ludp)
LDAP_TRACE(("DN '%s'\n", dn));
/* Unescape the DN */
- result = Curl_urldecode(conn->data, dn, 0, &unescaped, NULL, FALSE);
+ result = Curl_urldecode(conn->data, dn, 0, &unescaped, NULL, REJECT_ZERO);
if(result) {
rc = LDAP_NO_MEMORY;
@@ -949,7 +949,7 @@ static int _ldap_url_parse2(const struct connectdata *conn, LDAPURLDesc *ludp)
/* Unescape the attribute */
result = Curl_urldecode(conn->data, attributes[i], 0, &unescaped, NULL,
- FALSE);
+ REJECT_ZERO);
if(result) {
free(attributes);
@@ -1018,7 +1018,8 @@ static int _ldap_url_parse2(const struct connectdata *conn, LDAPURLDesc *ludp)
LDAP_TRACE(("filter '%s'\n", filter));
/* Unescape the filter */
- result = Curl_urldecode(conn->data, filter, 0, &unescaped, NULL, FALSE);
+ result = Curl_urldecode(conn->data, filter, 0, &unescaped, NULL,
+ REJECT_ZERO);
if(result) {
rc = LDAP_NO_MEMORY;