Skip to content

Commit

Permalink
Merge pull request OpenEVSE#125 from jeremypoulter/auth_fix fixes Ope…
Browse files Browse the repository at this point in the history
…nEVSE#101

'Fix' for auth crashing the ESP
  • Loading branch information
glynhudson authored Nov 24, 2017
2 parents 119600b + 24a7828 commit 95265f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/web_server_static.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ void StaticFileWebHandler::handleRequest(AsyncWebServerRequest *request)
dumpRequest(request);

// Are we authenticated
if(wifi_mode_is_sta() && www_username!="" &&
false == request->authenticate(www_username.c_str(), www_password.c_str())) {
if(wifi_mode_is_sta() &&
_username != "" && _password != "" &&
false == request->authenticate(_username.c_str(), _password.c_str()))
{
request->requestAuthentication(esp_hostname);
return;
}
Expand Down

0 comments on commit 95265f9

Please sign in to comment.