diff options
author | CoprDistGit <infra@openeuler.org> | 2024-10-21 00:52:10 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-10-21 00:52:10 +0000 |
commit | 3c88d5d34e1a50361b2b9e07c5325e83b94b7f4d (patch) | |
tree | 3d5e182ff1cb273ccf740352fc032edb7733e89e /backport-openldap-create-ldap-URLs-correctly-for-IPv6-addresses.patch | |
parent | 0017b7af4906f87b0d934be3d4e3502652129801 (diff) |
automatic import of curlopeneuler20.03_LTS_SP4
Diffstat (limited to 'backport-openldap-create-ldap-URLs-correctly-for-IPv6-addresses.patch')
-rw-r--r-- | backport-openldap-create-ldap-URLs-correctly-for-IPv6-addresses.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/backport-openldap-create-ldap-URLs-correctly-for-IPv6-addresses.patch b/backport-openldap-create-ldap-URLs-correctly-for-IPv6-addresses.patch new file mode 100644 index 0000000..aabfa79 --- /dev/null +++ b/backport-openldap-create-ldap-URLs-correctly-for-IPv6-addresses.patch @@ -0,0 +1,35 @@ +From 56935a7dada6975d5a46aa494de0af195e4e8659 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg <daniel@haxx.se> +Date: Sat, 30 Mar 2024 11:14:54 +0100 +Subject: [PATCH] openldap: create ldap URLs correctly for IPv6 addresses + +Reported-by: Sergio Durigan Junior +Fixes #13228 +Closes #13235 + +Conflict:Context adapt +Reference:https://github.com/curl/curl/commit/56935a7dada6975d5a46aa494de0af195e4e8659 +--- + lib/openldap.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/lib/openldap.c b/lib/openldap.c +index 47266f64e44733..85a37b8186041a 100644 +--- a/lib/openldap.c ++++ b/lib/openldap.c +@@ -548,9 +548,12 @@ static CURLcode oldap_connect(struct Curl_easy *data, bool *done) + + (void)done; + +- hosturl = aprintf("ldap%s://%s:%d", +- conn->handler->flags & PROTOPT_SSL? "s": "", +- conn->host.name, conn->remote_port); ++ hosturl = aprintf("%s://%s%s%s:%d", ++ conn->handler->scheme, ++ conn->bits.ipv6_ip? "[": "", ++ conn->host.name, ++ conn->bits.ipv6_ip? "]": "", ++ conn->remote_port); + if(!hosturl) + return CURLE_OUT_OF_MEMORY; + |