Re: [PATCH v3] imap-send: URI encode server folder
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 18, 2017, 22:19 UTC
- Message-ID
- <20171218221945.GC7854@aiede.mtv.corp.google.com>
- In-Reply-To
- <20171218191113.18600-1-kaartic.sivaraam@gmail.com>
Kaartic Sivaraam wrote:
Show 29 quoted lines
> From: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com> > > When trying to send a patch using 'imap-send' with 'curl' and the > following configuration: > > [imap] > folder = "[Gmail]/Drafts" > host = imaps://imap.gmail.com > port = 993 > sslverify = false > > results in the following error, > > curl_easy_perform() failed: URL using bad/illegal format or missing URL > > This is a consequence of not URI-encoding the folder portion of > the URL which contains characters such as '[' which are not > allowed in a URI. According to RFC3986, these characters should be > URI-encoded. > > So, URI-encode the folder before adding it to the URI to ensure it doesn't > contain characters that aren't allowed in a URI. > > Reported-by: Doron Behar <doron.behar@gmail.com> > Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com> > Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> > --- > imap-send.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-)
Thanks! Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Is there a straightforward way to check that this behavior gets preserved in tests?
Sincerely, Jonathan