dovecot-1.2: digest-md5: If client sent no input, log it as such...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 9 21:44:08 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/a5bc67646c66
changeset: 8933:a5bc67646c66
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 09 14:44:02 2009 -0400
description:
digest-md5: If client sent no input, log it as such instead of a more cryptic error.

diffstat:

1 file changed, 5 insertions(+)
src/auth/mech-digest-md5.c |    5 +++++

diffs (15 lines):

diff -r 99ecc7f748a8 -r a5bc67646c66 src/auth/mech-digest-md5.c
--- a/src/auth/mech-digest-md5.c	Wed Apr 08 18:30:06 2009 -0400
+++ b/src/auth/mech-digest-md5.c	Thu Apr 09 14:44:02 2009 -0400
@@ -472,6 +472,11 @@ static bool parse_digest_response(struct
 	*error = NULL;
 	failed = FALSE;
 
+	if (size == 0) {
+		*error = "Client sent no input";
+		return FALSE;
+	}
+
 	copy = t_strdup_noconst(t_strndup(data, size));
 	while (*copy != '\0') {
 		if (parse_next(&copy, &key, &value)) {


More information about the dovecot-cvs mailing list