Req #81616 [Com]: curl should be build against libidn2

From: Date: Wed, 07 Dec 2022 07:26:55 +0000
Subject: Req #81616 [Com]: curl should be build against libidn2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243065@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81616&edit=1 ID: 81616 Comment by: Leonard5632anya at gmail dot com Reported by: gblanchet at cofomo dot com Summary: curl should be build against libidn2 Status: Open Type: Feature/Change Request Package: cURL related Operating System: Windows PHP Version: 8.0.12 Block user comment: N Private report: N New Comment: (https://www.pfmlogin.org/)github.com We therefore see the following in the config log: ... checking whether to build with libidn2... (assumed) yes ... checking for libidn2 options with pkg-config... no configure: IDN_LIBS: "-lidn2" configure: IDN_LDFLAGS: "" configure: IDN_CPPFLAGS: "" configure: IDN_DIR: "" checking if idn2_lookup_ul can be linked... yes checking idn2.h usability... yes checking idn2.h presence... yes checking for idn2.h... yes Previous Comments: ------------------------------------------------------------------------ [2021-11-16 21:24:51] gblanchet at cofomo dot com Sorry, wrong repo, ignore my previous comment ------------------------------------------------------------------------ [2021-11-16 21:20:49] gblanchet at cofomo dot com I log a bug for this in the Windows sdk: https://github.com/tpn/winsdk-10/issues/5 ------------------------------------------------------------------------ [2021-11-15 20:42:04] gblanchet at cofomo dot com As I understand, building with MSVC will use IdnMapping function in Windows which is IDNA2003 compliant. Surprisingly, Microsoft .net core seems to have the same issue: it is compliant with 2008 only on Linux: https://github.com/dotnet/runtime/issues/30086 I think this is thus a Windows issue, I'm sorry I opened it in the wrong place, maybe you can close this bug until they fix it on their side. ------------------------------------------------------------------------ [2021-11-15 19:44:08] cmb@php.net Well, that makefile is for MinGW, but we're building with MSVC, and there is nothing about libidn(2) in the respective makefile[1]. But even if it was, someone would need to port libidn2[2] to Windows MSVC; from a quick glance it appears they are only supporting autotools builds. But even if all that was possible, it might not be working smoothly with other Win APIs. Still, I agree, something to consider. [1] <https://github.com/curl/curl/blob/master/winbuild/Makefile.vc> [2] <https://gitlab.com/libidn/libidn2> ------------------------------------------------------------------------ [2021-11-15 19:11:59] gblanchet at cofomo dot com Thanks for the quick response. I agree, apparantely, cURL uses IDNA2003 on the Windows platform: https://github.com/curl/curl/blob/master/docs/URL-SYNTAX.md#idna But it seems to be possible to give the flag USE_LIBIDN2 to compile it with libidn2 even on Windows: https://github.com/curl/curl/blob/3bf54f90f3875062c0aa984cb90ddd35565d01cd/docs/examples/Makefile.m32#L347 This change should be considered since the IDNA2003 protocol is deprecated and some url won't work anymore. Thanks a lot ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=81616 -- Edit this bug report at https://bugs.php.net/bug.php?id=81616&edit=1

« previous php.bugs (#243065) next »