From 2ad44ce70d0dbe6b11d0e0ff3df6bab7c6beb255 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 16 Feb 2022 13:53:00 +0100 Subject: ftp: provide error message for control bytes in path Closes #8460 --- lib/ftp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/ftp.c') 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 */ -- cgit v1.2.1