From 04d031a1aa16aef0b095584ab5f539d38448500a Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Fri, 15 Mar 2024 08:25:10 +0200 Subject: [PATCH] doveconf: Hide keys that end with _secret --- src/config/doveconf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config/doveconf.c b/src/config/doveconf.c index cbc33799e9..70466bf789 100644 --- a/src/config/doveconf.c +++ b/src/config/doveconf.c @@ -259,10 +259,12 @@ hide_secrets_from_value(struct ostream *output, const char *key, { bool ret = FALSE, quote = value_need_quote(value); const char *ptr, *optr, *secret; + if (*value != '\0' && (key_ends_with(key, value, "_password") || key_ends_with(key, value, "_key") || key_ends_with(key, value, "_nonce") || + key_ends_with(key, value, "_secret") || str_begins_with(key, "ssl_dh"))) { o_stream_nsend_str(output, "# hidden, use -P to show it"); return TRUE; -- 2.47.3