diff --git a/backport-curl_path-make-SFTP-handle-a-path-like-properly.patch b/backport-curl_path-make-SFTP-handle-a-path-like-properly.patch new file mode 100644 index 0000000000000000000000000000000000000000..048786c12421d6cf32b7271faceff55d1cff9968 --- /dev/null +++ b/backport-curl_path-make-SFTP-handle-a-path-like-properly.patch @@ -0,0 +1,34 @@ +From 0ede81dcc61844cecce8904fb4de24319afeb024 Mon Sep 17 00:00:00 2001 +From: Carlos Henrique Lima Melara +Date: Thu, 5 Jun 2025 14:29:06 +0200 +Subject: [PATCH] curl_path: make SFTP handle a path like /~ properly. + +... without a trailing slash. + +Fixes #17534 +Closes #17542 + +Conflict: lib/vssh/curl_path.c => lib/curl_path.c +curlx_dyn* => Curl_dyn* +Reference: https://github.com/curl/curl/commit/0ede81dcc61844cecce8904fb4de24319afeb024 +--- + lib/curl_path.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/lib/curl_path.c b/lib/curl_path.c +index 117d2e6009f6..474a5ecb8e27 100644 +--- a/lib/curl_path.c ++++ b/lib/curl_path.c +@@ -84,6 +84,12 @@ CURLcode Curl_getworkingpath(struct Curl_easy *data, + return CURLE_OUT_OF_MEMORY; + } + } ++ else { ++ if(Curl_dyn_add(&npath, "/")) { ++ free(working_path); ++ return CURLE_OUT_OF_MEMORY; ++ } ++ } + } + + if(Curl_dyn_len(&npath)) { diff --git a/curl.spec b/curl.spec index 43d40c8180c1a4f5f80887018f40eb0c180086c0..0bba198563e97313d2e8b1e5f8a9ba16d424b3f9 100644 --- a/curl.spec +++ b/curl.spec @@ -7,7 +7,7 @@ Name: curl Version: 8.4.0 -Release: 18 +Release: 19 Summary: Curl is used in command lines or scripts to transfer data License: curl URL: https://curl.se/ @@ -53,6 +53,7 @@ Patch44: backport-urlapi-fix-redirect-to-a-new-fragment-or-query-only-ada Patch45: backport-tool_getparam-clear-sensitive-arguments-better.patch Patch46: backport-libssh-fix-freeing-of-resources-in-disconnect.patch Patch47: backport-openssl-fix-crash-on-missing-cert-password.patch +Patch48: backport-curl_path-make-SFTP-handle-a-path-like-properly.patch BuildRequires: automake brotli-devel coreutils gcc groff krb5-devel BuildRequires: libidn2-devel libnghttp2-devel libpsl-devel @@ -238,6 +239,12 @@ rm -rf ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la %{_mandir}/man3/* %changelog +* Mon Jul 28 2025 xinghe - 8.4.0-19 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:curl_path: make SFTP handle a path like /~ properly + * Wed May 07 2025 zhouyihang - 8.4.0-18 - Type:bugfix - CVE:NA