]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: Ignore empty value for "master" passdb extra field
authorAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 11 Aug 2021 05:48:29 +0000 (08:48 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 13 Aug 2021 06:46:32 +0000 (09:46 +0300)
src/login-common/client-common-auth.c

index ff9a439f288912743f1c1d95f67f6c835bfb47c5..eac9d48621682ca34b919efbc0bd7dbec2372747 100644 (file)
@@ -207,9 +207,11 @@ static void client_auth_parse_args(struct client *client, bool success,
                        reply_r->proxy_nopipelining = TRUE;
                else if (strcmp(key, "proxy_not_trusted") == 0)
                        reply_r->proxy_not_trusted = TRUE;
-               else if (strcmp(key, "master") == 0)
-                       reply_r->master_user = value;
-               else if (strcmp(key, "ssl") == 0) {
+               else if (strcmp(key, "master") == 0) {
+                       /* ignore empty master field */
+                       if (*value != '\0')
+                               reply_r->master_user = value;
+               } else if (strcmp(key, "ssl") == 0) {
                        reply_r->ssl_flags |= PROXY_SSL_FLAG_YES;
                        if (strcmp(value, "any-cert") == 0)
                                reply_r->ssl_flags |= PROXY_SSL_FLAG_ANY_CERT;