]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
digest-md5: If client sent no input, log it as such instead of a more cryptic error.
authorTimo Sirainen <tss@iki.fi>
Thu, 9 Apr 2009 18:44:02 +0000 (14:44 -0400)
committerTimo Sirainen <tss@iki.fi>
Thu, 9 Apr 2009 18:44:02 +0000 (14:44 -0400)
--HG--
branch : HEAD

src/auth/mech-digest-md5.c

index 2e86d73c9eb87b2e2ed13d92f7040e8a1ecdb98b..4856561f688d8bcf3f5389815310a45aca6afdef 100644 (file)
@@ -472,6 +472,11 @@ static bool parse_digest_response(struct digest_auth_request *request,
        *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)) {