refactor: prohibition of enabling portal auth with an empty login or password

This commit is contained in:
Yurii
2025-01-14 06:21:32 +03:00
parent 53ff69f03a
commit 0425cdc499

View File

@@ -602,6 +602,11 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
}
}
if (dst.portal.auth && (!strlen(dst.portal.login) || !strlen(dst.portal.password))) {
dst.portal.auth = false;
changed = true;
}
// opentherm
if (!src[FPSTR(S_OPENTHERM)][FPSTR(S_UNIT_SYSTEM)].isNull()) {