From 858dac8ca2a1d8619c684fc64e974faa65a01bfd Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 12 Apr 2018 16:07:31 +0300 Subject: [PATCH] doveconf: Fix infinite loop when hiding sensitive information For example with "nopassword=y". Broken in fc02343fd81a6fab272ac0366b15fc60ec44a8b6 --- src/config/doveconf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/config/doveconf.c b/src/config/doveconf.c index 1705329d80..873a3cb24b 100644 --- a/src/config/doveconf.c +++ b/src/config/doveconf.c @@ -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 */