redacting WIFI_PKEY in log
This commit is contained in:
parent
47d678cd23
commit
d23c992595
@ -68,7 +68,11 @@ void configPutDouble(const char *name, double value) {
|
||||
void configPrint() {
|
||||
info("Config:");
|
||||
for (JsonPair pair: config.as<JsonObject>()) {
|
||||
info(" - %s: \"%s\"", pair.key().c_str(), pair.value().as<const char *>());
|
||||
const char *value = pair.value().as<const char *>();
|
||||
if (strcmp(pair.key().c_str(), "WIFI_PKEY") == 0) {
|
||||
value = "[***]";
|
||||
}
|
||||
info(" - %s: \"%s\"", pair.key().c_str(), value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user