mirror of
https://github.com/curl/curl.git
synced 2026-04-22 03:02:26 +03:00
openldap: create ldap URLs correctly for IPv6 addresses
Reported-by: Sergio Durigan Junior Fixes #13228 Closes #13235
This commit is contained in:
parent
9126b141c9
commit
56935a7dad
1 changed files with 6 additions and 3 deletions
|
|
@ -548,9 +548,12 @@ static CURLcode oldap_connect(struct Curl_easy *data, bool *done)
|
|||
return result;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue