]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
recent change broke it
authorTimo Sirainen <tss@iki.fi>
Mon, 20 Oct 2003 07:33:21 +0000 (10:33 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 20 Oct 2003 07:33:21 +0000 (10:33 +0300)
--HG--
branch : HEAD

src/auth/mech-digest-md5.c

index 002356fb9cb4ab3a9254c36d7ce70825c6c03c2a..849d7ac1929c029cd0f823764e93aad80a93ccac 100644 (file)
@@ -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)