From: Timo Sirainen Date: Mon, 20 Oct 2003 07:33:21 +0000 (+0300) Subject: recent change broke it X-Git-Tag: 1.1.alpha1~4277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb8556e9dad90750ef0f55de2b3be8e5741e87d9;p=thirdparty%2Fdovecot%2Fcore.git recent change broke it --HG-- branch : HEAD --- diff --git a/src/auth/mech-digest-md5.c b/src/auth/mech-digest-md5.c index 002356fb9c..849d7ac192 100644 --- a/src/auth/mech-digest-md5.c +++ b/src/auth/mech-digest-md5.c @@ -219,6 +219,9 @@ static int verify_realm(const char *realm) { const char *const *tmp; + if (*realm == '\0') + return TRUE; + for (tmp = auth_realms; *tmp != NULL; tmp++) { if (strcasecmp(realm, *tmp) == 0) return TRUE; @@ -500,15 +503,17 @@ static int parse_digest_response(struct digest_auth_request *auth, copy++; } - if (!auth->nonce_found) { - *error = "Missing nonce parameter"; - failed = TRUE; - } else if (auth->cnonce == NULL) { - *error = "Missing cnonce parameter"; - failed = TRUE; - } else if (auth->username == NULL) { - *error = "Missing username parameter"; - failed = TRUE; + if (!failed) { + if (!auth->nonce_found) { + *error = "Missing nonce parameter"; + failed = TRUE; + } else if (auth->cnonce == NULL) { + *error = "Missing cnonce parameter"; + failed = TRUE; + } else if (auth->username == NULL) { + *error = "Missing username parameter"; + failed = TRUE; + } } if (auth->nonce_count == NULL)