dovecot-2.2: lib-imap: imap_quote() now skips any CR/LF characte...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 21 21:54:03 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/bf8a885c2077
changeset: 14621:bf8a885c2077
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jun 21 21:47:06 2012 +0300
description:
lib-imap: imap_quote() now skips any CR/LF characters from input.

diffstat:

 src/lib-imap/imap-quote.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 3a267dec53ca -r bf8a885c2077 src/lib-imap/imap-quote.c
--- a/src/lib-imap/imap-quote.c	Thu Jun 21 21:44:28 2012 +0300
+++ b/src/lib-imap/imap-quote.c	Thu Jun 21 21:47:06 2012 +0300
@@ -121,6 +121,10 @@
 	str_append_c(dest, '"');
 	for (; *src != '\0'; src++) {
 		switch (*src) {
+		case '\r':
+		case '\n':
+			/* not allowed */
+			break;
 		case '"':
 		case '\\':
 			str_append_c(dest, '\\');


More information about the dovecot-cvs mailing list