Skip to content

Commit

Permalink
curl: Fix regression with netrc handling
Browse files Browse the repository at this point in the history
  • Loading branch information
orgads committed Aug 3, 2022
1 parent c8d2c1c commit 75b8504
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
16 changes: 16 additions & 0 deletions 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
11 changes: 7 additions & 4 deletions mingw-w64-curl/PKGBUILD
Expand Up @@ -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')
Expand Down Expand Up @@ -37,15 +37,17 @@ 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'
'4f9d325265ef6f4e90ad637dea41afa6995388c921fe961ad5dc895aca10318b'
'c4e6bfd5b58f944d75293128effbd22fe42ee0131b915d9230ceb3c004c0322d'
'79eec8a337e375d5102fef884030ceacd163a79e5c495e9a974a6b9a11b60c61'
'7492d019036b5bec251bfbc3c0b40e5f16d3dd6b2515068835e087a6c21f19ad'
'590eb65e90e756eaad993d52a101f29091ada2c742c5a607684e88fc5c560d54')
'590eb65e90e756eaad993d52a101f29091ada2c742c5a607684e88fc5c560d54'
'0a749bbf4ebd95db5cba59d4014a04e4b34dab822fab26c39b695b852532073c')
validpgpkeys=('914C533DF9B2ADA2204F586D78E11C6B279D5C91' # Daniel Stenberg
'27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2'
'4461EAF0F8E9097F48AF0555F9FEAFF9D34A1BDB')
Expand All @@ -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
}
Expand Down

0 comments on commit 75b8504

Please sign in to comment.