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() {
|
void configPrint() {
|
||||||
info("Config:");
|
info("Config:");
|
||||||
for (JsonPair pair: config.as<JsonObject>()) {
|
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,8 +159,12 @@ void _setConfigString(const char *name, bool allowEmpty) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
configPutString(name, value);
|
configPutString(name, value);
|
||||||
|
if (strcmp(name, "WIFI_PKEY") == 0) {
|
||||||
|
info(R"(Set "%s" to [***])", name);
|
||||||
|
} else {
|
||||||
info(R"(Set "%s" to "%s")", name, value);
|
info(R"(Set "%s" to "%s")", name, value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void _info() {
|
void _info() {
|
||||||
uint64_t millis = getUptimeMillis();
|
uint64_t millis = getUptimeMillis();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user