dovecot-2.0: Fail if mail_attachment_hash contains '/' chars

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 2 14:34:06 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/b48b63c1ccb8
changeset: 12266:b48b63c1ccb8
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Sep 16 19:19:41 2010 +0100
description:
Fail if mail_attachment_hash contains '/' chars

diffstat:

 src/lib-storage/mail-storage-settings.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 44e0d823bd1f -r b48b63c1ccb8 src/lib-storage/mail-storage-settings.c
--- a/src/lib-storage/mail-storage-settings.c	Thu Sep 16 19:15:21 2010 +0100
+++ b/src/lib-storage/mail-storage-settings.c	Thu Sep 16 19:19:41 2010 +0100
@@ -358,6 +358,11 @@
 		return FALSE;
 	}
 
+	if (strchr(set->mail_attachment_hash, '/') != NULL) {
+		*error_r = "mail_attachment_hash setting "
+			"must not contain '/' characters";
+		return FALSE;
+	}
 	if (hash_format_init(set->mail_attachment_hash, &format, &error) < 0) {
 		*error_r = t_strconcat("Invalid mail_attachment_hash setting: ",
 				       error, NULL);


More information about the dovecot-cvs mailing list