changeset 20729:6979003cba55

doveconf: Hide any _api_key
author Aki Tuomi <aki.tuomi@dovecot.fi>
date Mon, 12 Sep 2016 09:47:26 +0300
parents 95731be96093
children a21e038e54c7
files src/config/doveconf.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/config/doveconf.c	Tue Aug 16 12:28:27 2016 +0300
+++ b/src/config/doveconf.c	Mon Sep 12 09:47:26 2016 +0300
@@ -305,7 +305,8 @@
 		o_stream_nsend_str(output, " = ");
 		if (hide_passwords && value[1] != '\0' &&
 		    ((value-key > 9 && strncmp(value-9, "_password", 9) == 0) ||
-		     strncmp(key, "ssl_key",7) == 0))  {
+		     (value-key > 8 && strncmp(value-8, "_api_key", 8) == 0) ||
+		     strncmp(key, "ssl_key",7) == 0)) {
 			o_stream_nsend_str(output, " # hidden, use -P to show it");
 		} else if (!value_need_quote(value+1))
 			o_stream_nsend_str(output, value+1);