]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth-client: auth-master - Restructure auth_user_list_reply_callback()
authorStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 3 Jun 2020 20:26:30 +0000 (22:26 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 27 Aug 2025 11:34:57 +0000 (13:34 +0200)
src/lib-auth-client/auth-master.c

index 35c1c9820e3e13fd4604b8a46e3efc2c2cd1de9d..de9df26e4635e6452695c7e76d9d3d7cd16a3e19 100644 (file)
@@ -773,16 +773,19 @@ auth_user_list_reply_callback(const char *cmd, const char *const *args,
                        ctx->failed = TRUE;
                }
                ctx->finished = TRUE;
-       } else if (strcmp(cmd, "LIST") == 0 && args[0] != NULL) {
-               /* we'll just read all the users into memory. otherwise we'd
-                  have to use a separate connection for listing and there's
-                  a higher chance of a failure since the connection could be
-                  open to dovecot-auth for a long time. */
-               str_append(ctx->username, args[0]);
-       } else {
+               return FALSE;
+       }
+       if (strcmp(cmd, "LIST") != 0 || args[0] == NULL) {
                e_error(conn->event, "User listing returned invalid input");
                ctx->failed = TRUE;
+               return FALSE;
        }
+
+       /* We'll just read all the users into memory. otherwise we'd have to use
+          a separate connection for listing and there's a higher chance of a
+          failure since the connection could be open to dovecot-auth for a long
+          time. */
+       str_append(ctx->username, args[0]);
        return FALSE;
 }