]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveconf: Fix infinite loop when hiding sensitive information
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 12 Apr 2018 13:07:31 +0000 (16:07 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 21 Aug 2018 09:11:42 +0000 (12:11 +0300)
For example with "nopassword=y". Broken in
fc02343fd81a6fab272ac0366b15fc60ec44a8b6

src/config/doveconf.c

index 1705329d80748016deac6d04d46d9be445aa6ad4..873a3cb24b98fda5758766fa44a3a067cb9ffe4f 100644 (file)
@@ -222,6 +222,11 @@ hide_secrets_from_value(struct ostream *output, const char *key,
                                        ptr++;
                        }
                        optr = ptr;
+               } else {
+                       /* "secret" is prefixed with alphanumeric character,
+                          e.g. "nopassword". So it's not really a secret.
+                          Skip forward to avoid infinite loop. */
+                       ptr++;
                }
        }
        /* if we are dealing with output, send rest here */