Skip to content

Commit fa7e903

Browse files
committed
Merge pull request #1880 from sauttefk/master
Re-enable old behaviour if passphrase string is empty
2 parents 2730ee0 + 4684e44 commit fa7e903

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ bool ESP8266WiFiAPClass::softAP(const char* ssid, const char* passphrase, int ch
8989
return false;
9090
}
9191

92-
if(!ssid || *ssid == 0 || strlen(ssid) > 31) {
92+
if(!ssid || strlen(ssid) == 0 || strlen(ssid) > 31) {
9393
// fail SSID too long or missing!
9494
DEBUG_WIFI("[AP] SSID too long or missing!\n");
9595
return false;
9696
}
9797

98-
if(passphrase && (strlen(passphrase) > 63 || strlen(passphrase) < 8)) {
98+
if(passphrase && strlen(passphrase) > 0 && (strlen(passphrase) > 63 || strlen(passphrase) < 8)) {
9999
// fail passphrase to long or short!
100100
DEBUG_WIFI("[AP] fail passphrase to long or short!\n");
101101
return false;

0 commit comments

Comments
 (0)