mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-14 14:25:54 +08:00
Do sent password to output
This commit is contained in:
parent
0385ce511d
commit
16a03d094b
@ -37,6 +37,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MAX_AUTH_IP 10
|
#define MAX_AUTH_IP 10
|
||||||
|
#define HIDDEN_PASSWORD "********"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
UPLOAD_STATUS_NONE = 0,
|
UPLOAD_STATUS_NONE = 0,
|
||||||
@ -1372,13 +1373,12 @@ void handle_password()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else { //no submit, need to get data from EEPROM
|
|
||||||
|
|
||||||
|
//Do not display password
|
||||||
//password
|
//password
|
||||||
sPassword="";
|
sPassword="";
|
||||||
sPassword2="";
|
sPassword2="";
|
||||||
}
|
|
||||||
//Display values
|
|
||||||
//password
|
|
||||||
KeysList.add(FPSTR(KEY_USER_PASSWORD));
|
KeysList.add(FPSTR(KEY_USER_PASSWORD));
|
||||||
ValuesList.add(sPassword);
|
ValuesList.add(sPassword);
|
||||||
KeysList.add(FPSTR(KEY_USER_PASSWORD2));
|
KeysList.add(FPSTR(KEY_USER_PASSWORD2));
|
||||||
@ -1486,6 +1486,12 @@ void handle_web_interface_configAP()
|
|||||||
}
|
}
|
||||||
//Password
|
//Password
|
||||||
sPassword = web_interface->WebServer.arg("PASSWORD");
|
sPassword = web_interface->WebServer.arg("PASSWORD");
|
||||||
|
//check if password is changed
|
||||||
|
if (sPassword == HIDDEN_PASSWORD){
|
||||||
|
if (!CONFIG::read_string(EP_AP_PASSWORD, sPassword , MAX_PASSWORD_LENGTH) ) {
|
||||||
|
sPassword=FPSTR(DEFAULT_AP_PASSWORD);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!CONFIG::isPasswordValid(sPassword.c_str())) {
|
if (!CONFIG::isPasswordValid(sPassword.c_str())) {
|
||||||
msg_alert_error=true;
|
msg_alert_error=true;
|
||||||
smsg.concat(F("Error: Incorrect password<BR>"));
|
smsg.concat(F("Error: Incorrect password<BR>"));
|
||||||
@ -1603,9 +1609,8 @@ void handle_web_interface_configAP()
|
|||||||
sSSID=FPSTR(DEFAULT_AP_SSID);
|
sSSID=FPSTR(DEFAULT_AP_SSID);
|
||||||
}
|
}
|
||||||
//password
|
//password
|
||||||
if (!CONFIG::read_string(EP_AP_PASSWORD, sPassword , MAX_PASSWORD_LENGTH) ) {
|
sPassword = HIDDEN_PASSWORD;
|
||||||
sPassword=FPSTR(DEFAULT_AP_PASSWORD);
|
|
||||||
}
|
|
||||||
//ssid visible ?
|
//ssid visible ?
|
||||||
if (!CONFIG::read_byte(EP_SSID_VISIBLE, &visible_buf )) {
|
if (!CONFIG::read_byte(EP_SSID_VISIBLE, &visible_buf )) {
|
||||||
visible_buf=DEFAULT_SSID_VISIBLE;
|
visible_buf=DEFAULT_SSID_VISIBLE;
|
||||||
@ -1911,6 +1916,13 @@ void handle_web_interface_configSTA()
|
|||||||
|
|
||||||
//Password
|
//Password
|
||||||
sPassword = web_interface->WebServer.arg("PASSWORD");
|
sPassword = web_interface->WebServer.arg("PASSWORD");
|
||||||
|
//check is password has been changed
|
||||||
|
if (sPassword == HIDDEN_PASSWORD){
|
||||||
|
if (!CONFIG::read_string(EP_STA_PASSWORD, sPassword , MAX_PASSWORD_LENGTH) ) {
|
||||||
|
sPassword=FPSTR(DEFAULT_STA_PASSWORD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!CONFIG::isPasswordValid(sPassword.c_str())) {
|
if (!CONFIG::isPasswordValid(sPassword.c_str())) {
|
||||||
msg_alert_error=true;
|
msg_alert_error=true;
|
||||||
smsg.concat(F("Error: Incorrect password<BR>"));
|
smsg.concat(F("Error: Incorrect password<BR>"));
|
||||||
@ -2008,9 +2020,8 @@ void handle_web_interface_configSTA()
|
|||||||
sSSID=FPSTR(DEFAULT_STA_SSID);
|
sSSID=FPSTR(DEFAULT_STA_SSID);
|
||||||
}
|
}
|
||||||
//password
|
//password
|
||||||
if (!CONFIG::read_string(EP_STA_PASSWORD, sPassword , MAX_PASSWORD_LENGTH) ) {
|
sPassword = HIDDEN_PASSWORD;
|
||||||
sPassword=FPSTR(DEFAULT_STA_PASSWORD);
|
|
||||||
}
|
|
||||||
//hostname
|
//hostname
|
||||||
if (!CONFIG::read_string(EP_HOSTNAME, sHostname , MAX_HOSTNAME_LENGTH) ) {
|
if (!CONFIG::read_string(EP_HOSTNAME, sHostname , MAX_HOSTNAME_LENGTH) ) {
|
||||||
sHostname=wifi_config.get_default_hostname();
|
sHostname=wifi_config.get_default_hostname();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user