From 75b850410f6be66f68661db29189c6c9f2b34943 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 3 Aug 2022 11:18:56 +0300 Subject: [PATCH] curl: Fix regression with netrc handling https://github.com/curl/curl/issues/8653 --- mingw-w64-curl/0005-netrc-fix.patch | 16 ++++++++++++++++ mingw-w64-curl/PKGBUILD | 11 +++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 mingw-w64-curl/0005-netrc-fix.patch diff --git a/mingw-w64-curl/0005-netrc-fix.patch b/mingw-w64-curl/0005-netrc-fix.patch new file mode 100644 index 000000000000..e5552017a899 --- /dev/null +++ b/mingw-w64-curl/0005-netrc-fix.patch @@ -0,0 +1,16 @@ +diff --git a/lib/url.c b/lib/url.c +index a56e4b0..9f29593 100644 +--- a/lib/url.c ++++ b/lib/url.c +@@ -2971,6 +2971,12 @@ static CURLcode override_login(struct Curl_easy *data, + /* don't update the user name below */ + userp = NULL; + } ++ /* no user was set but a password, set a blank user */ ++ if(userp && !*userp && *passwdp) { ++ *userp = strdup(""); ++ if(!*userp) ++ return CURLE_OUT_OF_MEMORY; ++ } + } + #endif \ No newline at end of file diff --git a/mingw-w64-curl/PKGBUILD b/mingw-w64-curl/PKGBUILD index 2eae4c571a30..5e687212f7c8 100644 --- a/mingw-w64-curl/PKGBUILD +++ b/mingw-w64-curl/PKGBUILD @@ -6,7 +6,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-gnutls" "${MINGW_PACKAGE_PREFIX}-${_realname}-winssl") pkgver=7.84.0 -pkgrel=2 +pkgrel=3 pkgdesc="Command line tool and library for transferring data with URLs (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -37,7 +37,8 @@ source=("https://github.com/curl/curl/releases/download/${_realname}-${pkgver//. "0001-Make-cURL-relocatable.patch" "0002-nghttp2-static.patch" "0003-libpsl-static-libs.patch" - "0004-more-static-fixes.patch") + "0004-more-static-fixes.patch" + "0005-netrc-fix.patch") sha256sums=('2d118b43f547bfe5bae806d8d47b4e596ea5b25a6c1f080aef49fbcd817c5db8' 'SKIP' '703cd0cb74e714f9e66d26de11c109dd76fab07e723af8dde56a35ea65102e5f' @@ -45,7 +46,8 @@ sha256sums=('2d118b43f547bfe5bae806d8d47b4e596ea5b25a6c1f080aef49fbcd817c5db8' 'c4e6bfd5b58f944d75293128effbd22fe42ee0131b915d9230ceb3c004c0322d' '79eec8a337e375d5102fef884030ceacd163a79e5c495e9a974a6b9a11b60c61' '7492d019036b5bec251bfbc3c0b40e5f16d3dd6b2515068835e087a6c21f19ad' - '590eb65e90e756eaad993d52a101f29091ada2c742c5a607684e88fc5c560d54') + '590eb65e90e756eaad993d52a101f29091ada2c742c5a607684e88fc5c560d54' + '0a749bbf4ebd95db5cba59d4014a04e4b34dab822fab26c39b695b852532073c') validpgpkeys=('914C533DF9B2ADA2204F586D78E11C6B279D5C91' # Daniel Stenberg '27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2' '4461EAF0F8E9097F48AF0555F9FEAFF9D34A1BDB') @@ -71,7 +73,8 @@ prepare() { 0001-Make-cURL-relocatable.patch \ 0002-nghttp2-static.patch \ 0003-libpsl-static-libs.patch \ - 0004-more-static-fixes.patch + 0004-more-static-fixes.patch \ + 0005-netrc-fix.patch autoreconf -vfi }