changeset 8933:a5bc67646c66 HEAD

digest-md5: If client sent no input, log it as such instead of a more cryptic error.
author Timo Sirainen <tss@iki.fi>
date Thu, 09 Apr 2009 14:44:02 -0400
parents 99ecc7f748a8
children 55ad1b77e626
files src/auth/mech-digest-md5.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
 	*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)) {