summaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-02-16 13:53:00 +0100
committerDaniel Stenberg <daniel@haxx.se>2022-02-17 08:24:14 +0100
commit2ad44ce70d0dbe6b11d0e0ff3df6bab7c6beb255 (patch)
treebff13382b66943b392d5acb24813d8cd6dbf8e91 /lib/ftp.c
parent8984a42ae4adef5c75a3f99271f741b9a78bcab9 (diff)
downloadcurl-2ad44ce70d0dbe6b11d0e0ff3df6bab7c6beb255.tar.gz
ftp: provide error message for control bytes in path
Closes #8460
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 908c970e3..c6efaedd3 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -4134,8 +4134,10 @@ CURLcode ftp_parse_url_path(struct Curl_easy *data)
/* url-decode ftp path before further evaluation */
result = Curl_urldecode(ftp->path, 0, &rawPath, &pathLen, REJECT_CTRL);
- if(result)
+ if(result) {
+ failf(data, "path contains control characters");
return result;
+ }
switch(data->set.ftp_filemethod) {
case FTPFILE_NOCWD: /* fastest, but less standard-compliant */