fix bug in authentication

This commit is contained in:
technyon
2022-07-17 22:18:56 +02:00
parent 7966d4c303
commit 5495165625
4 changed files with 6 additions and 5 deletions

View File

@@ -13,13 +13,14 @@ WebCfgServer::WebCfgServer(NukiWrapper* nuki, NukiOpenerWrapper* nukiOpener, Net
_allowRestartToPortal(allowRestartToPortal)
{
_confirmCode = generateConfirmCode();
_hostname = _preferences->getString(preference_hostname);
String str = _preferences->getString(preference_cred_user);
if(str.length() > 0)
{
memset(&_credUser, 0, sizeof(_credUser));
memset(&_credPassword, 0, sizeof(_credPassword));
_hasCredentials = true;
const char *user = str.c_str();
memcpy(&_credUser, user, str.length());