mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
fix validippassword
abstracted ap password validation passing a invalid password should be fatal , not fallback to null, but could be an optional define
This commit is contained in:
+2
-2
@@ -176,7 +176,7 @@ boolean WiFiManager::startConfigPortal(char const *apName, char const *apPasswo
|
||||
|
||||
_apName = apName;
|
||||
_apPassword = apPassword;
|
||||
if(!validApPassword) return;
|
||||
if(!validApPassword()) return false;
|
||||
|
||||
// do AP callback if set
|
||||
if ( _apcallback != NULL) {
|
||||
@@ -833,7 +833,7 @@ String WiFiManager::toStringIp(IPAddress ip) {
|
||||
return res;
|
||||
}
|
||||
|
||||
bool WiFiManager::validApPassword(){
|
||||
boolean WiFiManager::validApPassword(){
|
||||
// check that ap password is valid, return false
|
||||
if (_apPassword != NULL) {
|
||||
if (strlen(_apPassword) < 8 || strlen(_apPassword) > 63) {
|
||||
|
||||
+1
-1
@@ -170,7 +170,6 @@ class WiFiManager
|
||||
void handle204();
|
||||
boolean captivePortal();
|
||||
boolean configPortalHasTimeout();
|
||||
boolean validApPassword();
|
||||
|
||||
// DNS server
|
||||
const byte DNS_PORT = 53;
|
||||
@@ -179,6 +178,7 @@ class WiFiManager
|
||||
int getRSSIasQuality(int RSSI);
|
||||
boolean isIp(String str);
|
||||
String toStringIp(IPAddress ip);
|
||||
boolean validApPassword();
|
||||
|
||||
boolean connect;
|
||||
boolean _debug = true;
|
||||
|
||||
Reference in New Issue
Block a user