mirror of
https://github.com/arendst/Tasmota.git
synced 2025-08-02 07:27:42 +00:00
Merge pull request #5242 from spock64/development
Remove wifi password restriction
This commit is contained in:
commit
5527220ffe
@ -419,6 +419,7 @@
|
|||||||
/********************************************************************************************/
|
/********************************************************************************************/
|
||||||
|
|
||||||
#define D_ASTERIX "********"
|
#define D_ASTERIX "********"
|
||||||
|
#define D_ASTERISK_PWD "****"
|
||||||
|
|
||||||
#ifndef MY_LANGUAGE
|
#ifndef MY_LANGUAGE
|
||||||
#include "language/en-GB.h"
|
#include "language/en-GB.h"
|
||||||
|
@ -280,9 +280,9 @@ const char HTTP_FORM_WIFI[] PROGMEM =
|
|||||||
"<fieldset><legend><b> " D_WIFI_PARAMETERS " </b></legend>"
|
"<fieldset><legend><b> " D_WIFI_PARAMETERS " </b></legend>"
|
||||||
"<form method='get' action='wi'>"
|
"<form method='get' action='wi'>"
|
||||||
"<p><b>" D_AP1_SSID "</b> (" STA_SSID1 ")<br/><input id='s1' name='s1' placeholder='" STA_SSID1 "' value='{s1'></p>"
|
"<p><b>" D_AP1_SSID "</b> (" STA_SSID1 ")<br/><input id='s1' name='s1' placeholder='" STA_SSID1 "' value='{s1'></p>"
|
||||||
"<p><b>" D_AP1_PASSWORD "</b><br/><input id='p1' name='p1' type='password' placeholder='" D_AP1_PASSWORD "' value='" D_ASTERIX "'></p>"
|
"<p><b>" D_AP1_PASSWORD "</b><br/><input id='p1' name='p1' type='password' placeholder='" D_AP1_PASSWORD "' value='" D_ASTERISK_PWD "'></p>"
|
||||||
"<p><b>" D_AP2_SSID "</b> (" STA_SSID2 ")<br/><input id='s2' name='s2' placeholder='" STA_SSID2 "' value='{s2'></p>"
|
"<p><b>" D_AP2_SSID "</b> (" STA_SSID2 ")<br/><input id='s2' name='s2' placeholder='" STA_SSID2 "' value='{s2'></p>"
|
||||||
"<p><b>" D_AP2_PASSWORD "</b><br/><input id='p2' name='p2' type='password' placeholder='" D_AP2_PASSWORD "' value='" D_ASTERIX "'></p>"
|
"<p><b>" D_AP2_PASSWORD "</b><br/><input id='p2' name='p2' type='password' placeholder='" D_AP2_PASSWORD "' value='" D_ASTERISK_PWD "'></p>"
|
||||||
"<p><b>" D_HOSTNAME "</b> (" WIFI_HOSTNAME ")<br/><input id='h' name='h' placeholder='" WIFI_HOSTNAME" ' value='{h1'></p>";
|
"<p><b>" D_HOSTNAME "</b> (" WIFI_HOSTNAME ")<br/><input id='h' name='h' placeholder='" WIFI_HOSTNAME" ' value='{h1'></p>";
|
||||||
|
|
||||||
const char HTTP_FORM_LOG1[] PROGMEM =
|
const char HTTP_FORM_LOG1[] PROGMEM =
|
||||||
@ -1082,9 +1082,9 @@ void WifiSaveSettings(void)
|
|||||||
WebGetArg("s2", tmp, sizeof(tmp));
|
WebGetArg("s2", tmp, sizeof(tmp));
|
||||||
strlcpy(Settings.sta_ssid[1], (!strlen(tmp)) ? STA_SSID2 : tmp, sizeof(Settings.sta_ssid[1]));
|
strlcpy(Settings.sta_ssid[1], (!strlen(tmp)) ? STA_SSID2 : tmp, sizeof(Settings.sta_ssid[1]));
|
||||||
WebGetArg("p1", tmp, sizeof(tmp));
|
WebGetArg("p1", tmp, sizeof(tmp));
|
||||||
strlcpy(Settings.sta_pwd[0], (!strlen(tmp)) ? "" : (strchr(tmp,'*')) ? Settings.sta_pwd[0] : tmp, sizeof(Settings.sta_pwd[0]));
|
strlcpy(Settings.sta_pwd[0], (!strlen(tmp)) ? "" : (!strcmp(tmp,D_ASTERISK_PWD)) ? Settings.sta_pwd[0] : tmp, sizeof(Settings.sta_pwd[0]));
|
||||||
WebGetArg("p2", tmp, sizeof(tmp));
|
WebGetArg("p2", tmp, sizeof(tmp));
|
||||||
strlcpy(Settings.sta_pwd[1], (!strlen(tmp)) ? "" : (strchr(tmp,'*')) ? Settings.sta_pwd[1] : tmp, sizeof(Settings.sta_pwd[1]));
|
strlcpy(Settings.sta_pwd[1], (!strlen(tmp)) ? "" : (!strcmp(tmp,D_ASTERISK_PWD)) ? Settings.sta_pwd[1] : tmp, sizeof(Settings.sta_pwd[1]));
|
||||||
snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_WIFI D_CMND_HOSTNAME " %s, " D_CMND_SSID "1 %s, " D_CMND_SSID "2 %s"),
|
snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_WIFI D_CMND_HOSTNAME " %s, " D_CMND_SSID "1 %s, " D_CMND_SSID "2 %s"),
|
||||||
Settings.hostname, Settings.sta_ssid[0], Settings.sta_ssid[1]);
|
Settings.hostname, Settings.sta_ssid[0], Settings.sta_ssid[1]);
|
||||||
AddLog(LOG_LEVEL_INFO);
|
AddLog(LOG_LEVEL_INFO);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user