Skip to content

Commit

Permalink
- Add check for password too
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushsharma82 authored Sep 23, 2023
1 parent d0635c7 commit 49b6f64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ElegantOTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 49b6f64

Please sign in to comment.