]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth: Always iterate input arguments
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 27 Jul 2020 09:26:49 +0000 (12:26 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 27 Aug 2020 07:26:09 +0000 (10:26 +0300)
Makes next change easier

src/lib-auth/auth-client-request.c

index 290a3a6fda40f9fff286247bad105df48c3051c7..00dfcdff9944aafe0e23e28c9c3cb1b5d081f456 100644 (file)
@@ -272,14 +272,15 @@ void auth_client_request_server_input(struct auth_client_request *request,
                break;
        }
 
+       for (tmp = args; *tmp != NULL; tmp++) {
+               if (str_begins(*tmp, "resp=")) {
+                       base64_data = *tmp + 5;
+                       break;
+               }
+       }
+
        switch (status) {
        case AUTH_REQUEST_STATUS_OK:
-               for (tmp = args; *tmp != NULL; tmp++) {
-                       if (str_begins(*tmp, "resp=")) {
-                               base64_data = *tmp + 5;
-                               break;
-                       }
-               }
                e_debug(e->event(), "Finished");
                break;
        case AUTH_REQUEST_STATUS_CONTINUE: