diff --git a/lib/patrix/config.cpp b/lib/patrix/config.cpp index ac9f866..71ea556 100644 --- a/lib/patrix/config.cpp +++ b/lib/patrix/config.cpp @@ -68,7 +68,11 @@ void configPutDouble(const char *name, double value) { void configPrint() { info("Config:"); for (JsonPair pair: config.as()) { - info(" - %s: \"%s\"", pair.key().c_str(), pair.value().as()); + const char *value = pair.value().as(); + if (strcmp(pair.key().c_str(), "WIFI_PKEY") == 0) { + value = "[***]"; + } + info(" - %s: \"%s\"", pair.key().c_str(), value); } } diff --git a/lib/patrix/console.cpp b/lib/patrix/console.cpp index 833adc1..a85e24c 100644 --- a/lib/patrix/console.cpp +++ b/lib/patrix/console.cpp @@ -159,7 +159,11 @@ void _setConfigString(const char *name, bool allowEmpty) { return; } configPutString(name, value); - info(R"(Set "%s" to "%s")", name, value); + if (strcmp(name, "WIFI_PKEY") == 0) { + info(R"(Set "%s" to [***])", name); + } else { + info(R"(Set "%s" to "%s")", name, value); + } } void _info() {