Skip to content

Commit

Permalink
fix bug in authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
technyon committed Jul 17, 2022
1 parent 7966d4c commit 5495165
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#pragma once

#define nuki_hub_version "5.3"
#define nuki_hub_version "5.4"
5 changes: 3 additions & 2 deletions WebCfgServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
4 changes: 2 additions & 2 deletions WebCfgServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class WebCfgServer
const String intercss = "@font-face{font-family:Inter;src:url(src/inter/Inter-Thin.woff2) format(\\'woff2\\'),url(src/inter/Inter-Thin.woff) format(\\'woff\\'),url(src/inter/Inter-Thin.ttf) format(\\'truetype\\');font-weight:100;font-style:normal}@font-face{font-family:Inter;src:url(src/inter/Inter-ExtraLight.woff2) format(\\'woff2\\'),url(src/inter/Inter-ExtraLight.woff) format(\\'woff\\'),url(src/inter/Inter-ExtraLight.ttf) format(\\'truetype\\');font-weight:200;font-style:normal}@font-face{font-family:Inter;src:url(src/inter/Inter-Light.woff2) format(\\'woff2\\'),url(src/inter/Inter-Light.woff) format(\\'woff\\'),url(src/inter/Inter-Light.ttf) format(\\'truetype\\');font-weight:300;font-style:normal}@font-face{font-family:Inter;src:url(src/inter/Inter-Regular.woff2) format(\\'woff2\\'),url(src/inter/Inter-Regular.woff) format(\\'woff\\'),url(src/inter/Inter-Regular.ttf) format(\\'truetype\\');font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(src/inter/Inter-Medium.woff2) format(\\'woff2\\'),url(src/inter/Inter-Medium.woff) format(\\'woff\\'),url(src/inter/Inter-Medium.ttf) format(\\'truetype\\');font-weight:500;font-style:normal}@font-face{font-family:Inter;src:url(src/inter/Inter-SemiBold.woff2) format(\\'woff2\\'),url(src/inter/Inter-SemiBold.woff) format(\\'woff\\'),url(src/inter/Inter-SemiBold.ttf) format(\\'truetype\\');font-weight:600;font-style:normal}@font-face{font-family:Inter;src:url(src/inter/Inter-Bold.woff2) format(\\'woff2\\'),url(src/inter/Inter-Bold.woff) format(\\'woff\\'),url(src/inter/Inter-Bold.ttf) format(\\'truetype\\');font-weight:700;font-style:normal}@font-face{font-family:Inter;src:url(src/inter/Inter-ExtraBold.woff2) format(\\'woff2\\'),url(src/inter/Inter-ExtraBold.woff) format(\\'woff\\'),url(src/inter/Inter-ExtraBold.ttf) format(\\'truetype\\');font-weight:800;font-style:normal}@font-face{font-family:Inter;src:url(src/inter/Inter-Black.woff2) format(\\'woff2\\'),url(src/inter/Inter-Black.woff) format(\\'woff\\'),url(src/inter/Inter-Black.ttf) format(\\'truetype\\');font-weight:900;font-style:normal}@font-face{font-family:Inter;src:url(src/inter/Inter-ThinItalic.woff2) format(\\'woff2\\'),url(src/inter/Inter-ThinItalic.woff) format(\\'woff\\'),url(src/inter/Inter-ThinItalic.ttf) format(\\'truetype\\');font-weight:100;font-style:italic}@font-face{font-family:Inter;src:url(src/inter/Inter-ExtraLightItalic.woff2) format(\\'woff2\\'),url(src/inter/Inter-ExtraLightItalic.woff) format(\\'woff\\'),url(src/inter/Inter-ExtraLightItalic.ttf) format(\\'truetype\\');font-weight:200;font-style:italic}@font-face{font-family:Inter;src:url(src/inter/Inter-LightItalic.woff2) format(\\'woff2\\'),url(src/inter/Inter-LightItalic.woff) format(\\'woff\\'),url(src/inter/Inter-LightItalic.ttf) format(\\'truetype\\');font-weight:300;font-style:italic}@font-face{font-family:Inter;src:url(src/inter/Inter-Italic.woff2) format(\\'woff2\\'),url(src/inter/Inter-Italic.woff) format(\\'woff\\'),url(src/inter/Inter-Italic.ttf) format(\\'truetype\\');font-weight:400;font-style:italic}@font-face{font-family:Inter;src:url(src/inter/Inter-MediumItalic.woff2) format(\\'woff2\\'),url(src/inter/Inter-MediumItalic.woff) format(\\'woff\\'),url(src/inter/Inter-MediumItalic.ttf) format(\\'truetype\\');font-weight:500;font-style:italic}@font-face{font-family:Inter;src:url(src/inter/Inter-SemiBoldItalic.woff2) format(\\'woff2\\'),url(src/inter/Inter-SemiBoldItalic.woff) format(\\'woff\\'),url(src/inter/Inter-SemiBoldItalic.ttf) format(\\'truetype\\');font-weight:600;font-style:italic}@font-face{font-family:Inter;src:url(src/inter/Inter-BoldItalic.woff2) format(\\'woff2\\'),url(src/inter/Inter-BoldItalic.woff) format(\\'woff\\'),url(src/inter/Inter-BoldItalic.ttf) format(\\'truetype\\');font-weight:700;font-style:italic}@font-face{font-family:Inter;src:url(src/inter/Inter-ExtraBoldItalic.woff2) format(\\'woff2\\'),url(src/inter/Inter-ExtraBoldItalic.woff) format(\\'woff\\'),url(src/inter/Inter-ExtraBoldItalic.ttf) format(\\'truetype\\');font-weight:800;font-style:italic}@font-face{font-family:Inter;src:url(src/inter/Inter-BlackItalic.woff2) format(\\'woff2\\'),url(src/inter/Inter-BlackItalic.woff) format(\\'woff\\'),url(src/inter/Inter-BlackItalic.ttf) format(\\'truetype\\');font-weight:900;font-style:italic}";

bool _hasCredentials = false;
char _credUser[20] = {0};
char _credPassword[20] = {0};
char _credUser[31] = {0};
char _credPassword[31] = {0};
bool _allowRestartToPortal = false;
uint32_t _transferredSize = 0;
bool _otaStart = true;
Expand Down
Binary file modified webflash/nuki_hub.bin
Binary file not shown.

0 comments on commit 5495165

Please sign in to comment.