mirror of
https://github.com/curl/curl.git
synced 2026-07-30 16:18:02 +03:00
idn: switch to libidn2 use and IDNA2008 support
CVE-2016-8625 Bug: https://curl.haxx.se/docs/adv_20161102K.html Reported-by: Christian Heimes
This commit is contained in:
parent
42b650b9ea
commit
9c91ec7781
8 changed files with 66 additions and 254 deletions
|
|
@ -36,8 +36,8 @@
|
|||
# include <ares.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBIDN
|
||||
#include <stringprep.h>
|
||||
#ifdef USE_LIBIDN2
|
||||
#include <idn2.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBPSL
|
||||
|
|
@ -111,9 +111,9 @@ char *curl_version(void)
|
|||
left -= len;
|
||||
ptr += len;
|
||||
#endif
|
||||
#ifdef USE_LIBIDN
|
||||
if(stringprep_check_version(LIBIDN_REQUIRED_VERSION)) {
|
||||
len = snprintf(ptr, left, " libidn/%s", stringprep_check_version(NULL));
|
||||
#ifdef USE_LIBIDN2
|
||||
if(idn2_check_version(IDN2_VERSION)) {
|
||||
len = snprintf(ptr, left, " libidn2/%s", idn2_check_version(NULL));
|
||||
left -= len;
|
||||
ptr += len;
|
||||
}
|
||||
|
|
@ -365,10 +365,10 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
|
|||
version_info.ares_num = aresnum;
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_LIBIDN
|
||||
#ifdef USE_LIBIDN2
|
||||
/* This returns a version string if we use the given version or later,
|
||||
otherwise it returns NULL */
|
||||
version_info.libidn = stringprep_check_version(LIBIDN_REQUIRED_VERSION);
|
||||
version_info.libidn = idn2_check_version(IDN2_VERSION);
|
||||
if(version_info.libidn)
|
||||
version_info.features |= CURL_VERSION_IDN;
|
||||
#elif defined(USE_WIN32_IDN)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue