dovecot-2.2: imap: GENURLAUTH and URLFETCH didn't escape URL par...

dovecot at dovecot.org dovecot at dovecot.org
Sun Mar 24 18:48:38 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/d3e5585778f8
changeset: 16105:d3e5585778f8
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Mar 24 18:48:28 2013 +0200
description:
imap: GENURLAUTH and URLFETCH didn't escape URL parameters when needed.

diffstat:

 src/imap/cmd-genurlauth.c |  3 ++-
 src/imap/cmd-urlfetch.c   |  3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r a4d4edb63ff9 -r d3e5585778f8 src/imap/cmd-genurlauth.c
--- a/src/imap/cmd-genurlauth.c	Sun Mar 24 18:14:11 2013 +0200
+++ b/src/imap/cmd-genurlauth.c	Sun Mar 24 18:48:28 2013 +0200
@@ -3,6 +3,7 @@
 #include "imap-common.h"
 #include "str.h"
 #include "imap-commands.h"
+#include "imap-quote.h"
 #include "imap-urlauth.h"
 
 bool cmd_genurlauth(struct client_command_context *cmd)
@@ -43,7 +44,7 @@
 		}
 
 		str_append_c(response, ' ');
-		str_append(response, url);
+		imap_append_astring(response, url);
 	}
 
 	client_send_line(cmd->client, str_c(response));
diff -r a4d4edb63ff9 -r d3e5585778f8 src/imap/cmd-urlfetch.c
--- a/src/imap/cmd-urlfetch.c	Sun Mar 24 18:14:11 2013 +0200
+++ b/src/imap/cmd-urlfetch.c	Sun Mar 24 18:48:28 2013 +0200
@@ -8,6 +8,7 @@
 #include "istream.h"
 #include "ostream.h"
 #include "imap-url.h"
+#include "imap-quote.h"
 #include "imap-common.h"
 #include "imap-commands.h"
 #include "imap-urlauth.h"
@@ -184,7 +185,7 @@
 		ctx->extended = TRUE;
 
 		str_append(response, "* URLFETCH ");
-		str_append(response, reply->url);
+		imap_append_astring(response, reply->url);
 		str_append(response, " (");
 		if ((reply->flags & IMAP_URLAUTH_FETCH_FLAG_BODYPARTSTRUCTURE) != 0 &&
 		    reply->bodypartstruct != NULL) {


More information about the dovecot-cvs mailing list