Removing no-security AP
This commit is contained in:
parent
d1ee9e44d6
commit
99de694f96
|
|
@ -24,7 +24,9 @@ std::list <tReceivedPacketData*> receivedPackets;
|
||||||
const int MAX_RECEIVED_LIST_SIZE = 50;
|
const int MAX_RECEIVED_LIST_SIZE = 50;
|
||||||
|
|
||||||
String apSSID = "";
|
String apSSID = "";
|
||||||
String apPassword = "xxxxxxxxxx";
|
String apPassword;
|
||||||
|
String defApPassword = "xxxxxxxxxx";
|
||||||
|
|
||||||
WebServer server(80);
|
WebServer server(80);
|
||||||
#ifdef KISS_PROTOCOL
|
#ifdef KISS_PROTOCOL
|
||||||
WiFiServer tncServer(NETWORK_TNC_PORT);
|
WiFiServer tncServer(NETWORK_TNC_PORT);
|
||||||
|
|
@ -134,7 +136,7 @@ void handle_SaveWifiCfg() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server.arg(PREF_AP_PASSWORD)!="*" && server.arg(PREF_WIFI_PASSWORD).length()>0 && server.arg(PREF_AP_PASSWORD).length()<8){
|
if (server.arg(PREF_AP_PASSWORD)!="*" && server.arg(PREF_AP_PASSWORD).length()<8){
|
||||||
server.send(403, "text/plain", "AP Password must be minimum 8 character");
|
server.send(403, "text/plain", "AP Password must be minimum 8 character");
|
||||||
} else {
|
} else {
|
||||||
if (server.arg(PREF_AP_PASSWORD)!="*") {
|
if (server.arg(PREF_AP_PASSWORD)!="*") {
|
||||||
|
|
@ -372,6 +374,8 @@ void handle_saveDeviceCfg(){
|
||||||
if (preferences.getString(PREF_AP_PASSWORD).length() > 8) {
|
if (preferences.getString(PREF_AP_PASSWORD).length() > 8) {
|
||||||
// 8 characters is requirements for WPA2
|
// 8 characters is requirements for WPA2
|
||||||
apPassword = preferences.getString(PREF_AP_PASSWORD);
|
apPassword = preferences.getString(PREF_AP_PASSWORD);
|
||||||
|
} else {
|
||||||
|
apPassword = defApPassword;
|
||||||
}
|
}
|
||||||
if (!wifi_ssid.length()){
|
if (!wifi_ssid.length()){
|
||||||
WiFi.softAP(apSSID.c_str(), apPassword.c_str());
|
WiFi.softAP(apSSID.c_str(), apPassword.c_str());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue