From d0b5fbcaaf4b9d0542da7090a691bf4db8db924e Mon Sep 17 00:00:00 2001 From: Robert van den Breemen Date: Sat, 13 Apr 2024 13:18:01 +0200 Subject: [PATCH] fix: hiding the password in the UI --- data/index.js | 6 ++++++ restAPI.ino | 5 +++-- version.h | 18 +++++++++--------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/data/index.js b/data/index.js index 5cdb509..5423ef3 100644 --- a/data/index.js +++ b/data/index.js @@ -513,6 +513,12 @@ sInput.setAttribute("type", "text"); sInput.setAttribute("maxlength", data[i].maxlen); sInput.setAttribute("size", (data[i].maxlen > 20 ? 20 : data[i].maxlen)); + } + else if (data[i].type == "p") + { + sInput.setAttribute("type", "password"); + sInput.setAttribute("maxlength", data[i].maxlen); + sInput.setAttribute("size", (data[i].maxlen > 20 ? 20 : data[i].maxlen)); } else if (data[i].type == "f") { diff --git a/restAPI.ino b/restAPI.ino index 5dee78d..c2943df 100644 --- a/restAPI.ino +++ b/restAPI.ino @@ -421,7 +421,8 @@ void sendDeviceSettings() RESTDebugTln(F("sending device settings ...\r")); sendStartJsonObj("settings"); - + + //sendJsonSettingObj("string", settingString, "p", sizeof(settingString)-1); //sendJsonSettingObj("string", settingString, "s", sizeof(settingString)-1); //sendJsonSettingObj("float", settingFloat, "f", 0, 10, 5); //sendJsonSettingObj("intager", settingInteger , "i", 2, 60); @@ -431,7 +432,7 @@ void sendDeviceSettings() sendJsonSettingObj("mqttbroker", CSTR(settingMQTTbroker), "s", 32); sendJsonSettingObj("mqttbrokerport", settingMQTTbrokerPort, "i", 0, 65535); sendJsonSettingObj("mqttuser", CSTR(settingMQTTuser), "s", 32); - sendJsonSettingObj("mqttpasswd", CSTR(settingMQTTpasswd), "s", 100); + sendJsonSettingObj("mqttpasswd", CSTR(settingMQTTpasswd), "p", 100); sendJsonSettingObj("mqtttoptopic", CSTR(settingMQTTtopTopic), "s", 15); sendJsonSettingObj("mqtthaprefix", CSTR(settingMQTThaprefix), "s", 20); sendJsonSettingObj("mqttharebootdetection", settingMQTTharebootdetection, "b"); diff --git a/version.h b/version.h index 95e8b42..2611dfc 100644 --- a/version.h +++ b/version.h @@ -2,15 +2,15 @@ #define _VERSION_MAJOR 0 #define _VERSION_MINOR 10 #define _VERSION_PATCH 3 -#define _VERSION_BUILD 2110 -#define _VERSION_GITHASH "054866b" +#define _VERSION_BUILD 2111 +#define _VERSION_GITHASH "8d9da27" #define _VERSION_PRERELEASE beta -#define _VERSION_DATE "08-04-2024" -#define _VERSION_TIME "21:38:09" +#define _VERSION_DATE "13-04-2024" +#define _VERSION_TIME "13:05:44" #define _SEMVER_CORE "0.10.3" -#define _SEMVER_BUILD "0.10.3+2110" -#define _SEMVER_GITHASH "0.10.3+054866b" -#define _SEMVER_FULL "0.10.3-beta+054866b" -#define _SEMVER_NOBUILD "0.10.3-beta (08-04-2024)" -#define _VERSION "0.10.3-beta+054866b (08-04-2024)" +#define _SEMVER_BUILD "0.10.3+2111" +#define _SEMVER_GITHASH "0.10.3+8d9da27" +#define _SEMVER_FULL "0.10.3-beta+8d9da27" +#define _SEMVER_NOBUILD "0.10.3-beta (13-04-2024)" +#define _VERSION "0.10.3-beta+8d9da27 (13-04-2024)" //The version information is created automatically, more information here: https://github.com/rvdbreemen/autoinc-semver