dovecot-2.2: uri-util: Control characters weren't properly escaped.

dovecot at dovecot.org dovecot at dovecot.org
Tue Dec 18 18:54:37 EET 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/ce258aa11821
changeset: 15487:ce258aa11821
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Dec 18 18:54:31 2012 +0200
description:
uri-util: Control characters weren't properly escaped.
e.g. "%0a" is correct, "% a" is not.

diffstat:

 src/lib/uri-util.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r cde6da31e6ec -r ce258aa11821 src/lib/uri-util.c
--- a/src/lib/uri-util.c	Tue Dec 18 10:44:28 2012 +0200
+++ b/src/lib/uri-util.c	Tue Dec 18 18:54:31 2012 +0200
@@ -763,7 +763,7 @@
 	while (*p != '\0') {
 		if ((*p & 0x80) != 0 || (esc_table[*p] & esc_mask) == 0 ||
 		    strchr(esc_extra, (char)*p) != NULL) {
-			str_printfa(out, "%%%2x", *p);
+			str_printfa(out, "%%%02x", *p);
 		} else {
 			str_append_c(out, *p);
 		}


More information about the dovecot-cvs mailing list