Always redact TOTP secret

This commit is contained in:
iranl
2025-02-11 17:10:40 +01:00
parent 0a0d0b9ea7
commit 28da937c51
2 changed files with 9 additions and 4 deletions

View File

@@ -427,10 +427,14 @@ void ImportExport::exportNukiHubJson(JsonDocument &json, bool redacted, bool pai
{
continue;
}
if(strcmp(key, preference_totp_secret) == 0)
{
continue;
}
if(!redacted) if(std::find(redactedPrefs.begin(), redactedPrefs.end(), key) != redactedPrefs.end())
{
continue;
}
{
continue;
}
if(!_preferences->isKey(key))
{
json[key] = "";