[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 221/256: imap: quote atoms properly when escaping c
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 221/256: imap: quote atoms properly when escaping characters |
Date: |
Fri, 06 Oct 2017 19:45:12 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 3b05f79ef8c88468e2684760ec39065c739a1f3d
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Sep 21 09:17:06 2017 +0200
imap: quote atoms properly when escaping characters
Updates test 800 to verify
Fixes #1902
Closes #1903
---
lib/imap.c | 4 ++--
tests/data/test800 | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/imap.c b/lib/imap.c
index d37113aae..954d18f37 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -1797,7 +1797,7 @@ static char *imap_atom(const char *str, bool escape_only)
return strdup(str);
/* Calculate the new string length */
- newlen = strlen(str) + backsp_count + quote_count + (others_exists ? 2 : 0);
+ newlen = strlen(str) + backsp_count + quote_count + (escape_only ? 0 : 2);
/* Allocate the new string */
newstr = (char *) malloc((newlen + 1) * sizeof(char));
@@ -1806,7 +1806,7 @@ static char *imap_atom(const char *str, bool escape_only)
/* Surround the string in quotes if necessary */
p2 = newstr;
- if(others_exists) {
+ if(!escape_only) {
newstr[0] = '"';
newstr[newlen - 1] = '"';
p2++;
diff --git a/tests/data/test800 b/tests/data/test800
index 1ac1da59b..360206b43 100644
--- a/tests/data/test800
+++ b/tests/data/test800
@@ -31,7 +31,7 @@ imap
IMAP FETCH message
</name>
<command>
-'imap://%HOSTIP:%IMAPPORT/800/;UID=1' -u "user*:secret{"
+'imap://%HOSTIP:%IMAPPORT/800/;UID=1' -u '"user:sec"ret{'
</command>
</client>
@@ -40,7 +40,7 @@ IMAP FETCH message
<verify>
<protocol>
A001 CAPABILITY
-A002 LOGIN "user*" "secret{"
+A002 LOGIN "\"user" "sec\"ret{"
A003 SELECT 800
A004 FETCH 1 BODY[]
A005 LOGOUT
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 74/256: vtls: remove obsolete declarations of SSL backend functionality, (continued)
- [GNUnet-SVN] [gnurl] 74/256: vtls: remove obsolete declarations of SSL backend functionality, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 124/256: checksrc: disable SPACEBEFOREPAREN for case statement., gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 121/256: Curl_base64_encode: always call with a real data handle., gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 153/256: curl.h: use lower case curl_mime* as for all public symbols, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 171/256: http-proxy: when not doing CONNECT, that phase is done immediately, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 175/256: configure: check for C++ compiler after C, to make it non-fatal, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 72/256: axtls: reorder functions topologically, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 165/256: HISTORY: added some recent items, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 132/256: tool_formparse: fix some trivial warnings, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 35/256: mailmap: de-duplify some git authors, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 221/256: imap: quote atoms properly when escaping characters,
gnunet <=
- [GNUnet-SVN] [gnurl] 219/256: vtls: provide curl_global_sslset() even in non-SSL builds, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 217/256: openssl: only verify RSA private key if supported, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 59/256: darwinssl: handle long strings in TLS certs, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 73/256: schannel: reorder functions topologically, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 69/256: vtls: move sha256sum into the Curl_ssl struct, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 195/256: rtsp: Segfault in rtsp.c when using WRITEDATA, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 253/256: build-openssl.bat: Warn OpenSSL 1.1.0 not yet supported, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 30/256: metalink: adjust source code style, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 149/256: docs/curl_mime_*.3: added examples, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 93/256: configure: allow setting the default SSL backend, gnunet, 2017/10/06