summaryrefslogtreecommitdiff
path: root/lib/imap.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-06-23 16:13:50 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-06-25 09:57:18 +0200
commit31e53584db5879894809fbde5445aac7553ac3e2 (patch)
tree2cdf73cadcb2bbc0e7d9308ef46b9a4a7e44db23 /lib/imap.c
parent646cc574f0b72723906224824a57cd37ee88e9df (diff)
downloadcurl-31e53584db5879894809fbde5445aac7553ac3e2.tar.gz
escape: make the URL decode able to reject only %00 bytes
... or all "control codes" or nothing. Assisted-by: Nicolas Sterchele
Diffstat (limited to 'lib/imap.c')
-rw-r--r--lib/imap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/imap.c b/lib/imap.c
index 14c76f08e..cad0e5908 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -1957,7 +1957,7 @@ static CURLcode imap_parse_url_path(struct connectdata *conn)
end--;
result = Curl_urldecode(data, begin, end - begin, &imap->mailbox, NULL,
- TRUE);
+ REJECT_CTRL);
if(result)
return result;
}
@@ -1979,7 +1979,8 @@ static CURLcode imap_parse_url_path(struct connectdata *conn)
return CURLE_URL_MALFORMAT;
/* Decode the name parameter */
- result = Curl_urldecode(data, begin, ptr - begin, &name, NULL, TRUE);
+ result = Curl_urldecode(data, begin, ptr - begin, &name, NULL,
+ REJECT_CTRL);
if(result)
return result;
@@ -1989,7 +1990,8 @@ static CURLcode imap_parse_url_path(struct connectdata *conn)
ptr++;
/* Decode the value parameter */
- result = Curl_urldecode(data, begin, ptr - begin, &value, &valuelen, TRUE);
+ result = Curl_urldecode(data, begin, ptr - begin, &value, &valuelen,
+ REJECT_CTRL);
if(result) {
free(name);
return result;
@@ -2077,7 +2079,7 @@ static CURLcode imap_parse_custom_request(struct connectdata *conn)
if(custom) {
/* URL decode the custom request */
- result = Curl_urldecode(data, custom, 0, &imap->custom, NULL, TRUE);
+ result = Curl_urldecode(data, custom, 0, &imap->custom, NULL, REJECT_CTRL);
/* Extract the parameters if specified */
if(!result) {