Skip to content

Commit

Permalink
Fixed Captive portal not allowing logins
Browse files Browse the repository at this point in the history
  • Loading branch information
doudar committed Mar 14, 2024
1 parent 183cd74 commit 94cad48
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/HTTP_Server_Basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@ void startWifi() {

// Couldn't connect to existing network, Create SoftAP
if (WiFi.status() != WL_CONNECTED) {
String t_pass = DEFAULT_PASSWORD;
if (String(userConfig->getSsid()) == DEVICE_NAME) {
if (strcmp(userConfig->getSsid(), DEVICE_NAME) == 0) {
// If default SSID is still in use, let the user
// select a new password.
// Else Fall Back to the default password (probably "password")
String t_pass = String(userConfig->getPassword());
}
WiFi.softAP(userConfig->getDeviceName(), t_pass.c_str());
WiFi.softAP(userConfig->getDeviceName(), userConfig->getPassword());
}else{
WiFi.softAP(userConfig->getDeviceName(), DEFAULT_PASSWORD);}
vTaskDelay(50);
myIP = WiFi.softAPIP();
/* Setup the DNS server redirecting all the domains to the apIP */
Expand Down

0 comments on commit 94cad48

Please sign in to comment.