From 49b6f64d8de6146c574cbdaf60fa3e7271faae6b Mon Sep 17 00:00:00 2001 From: Ayush Sharma Date: Sat, 23 Sep 2023 22:45:13 +0530 Subject: [PATCH] - Add check for password too --- src/ElegantOTA.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ElegantOTA.cpp b/src/ElegantOTA.cpp index 36aa967..33f3df0 100644 --- a/src/ElegantOTA.cpp +++ b/src/ElegantOTA.cpp @@ -5,7 +5,7 @@ ElegantOTAClass::ElegantOTAClass(){} void ElegantOTAClass::begin(ELEGANTOTA_WEBSERVER *server, const char * username, const char * password){ _server = server; - if (strlen(username) > 0) { + if (strlen(username) > 0 && strlen(password) > 0) { strlcpy(_username, username, sizeof(_username)); strlcpy(_password, password, sizeof(_password)); _authenticate = true;