From 3480e1a94f1cd8cd0f0d360c50271870798d4dcc Mon Sep 17 00:00:00 2001 From: iranl Date: Wed, 2 Jul 2025 21:24:17 +0200 Subject: [PATCH] BLE improvements --- lib/nuki_ble | 2 +- src/Config.h | 2 +- src/WebCfgServer.cpp | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/nuki_ble b/lib/nuki_ble index c54698d..98872d9 160000 --- a/lib/nuki_ble +++ b/lib/nuki_ble @@ -1 +1 @@ -Subproject commit c54698d31d6747df166fc522145862e9560eb0d5 +Subproject commit 98872d9004118f1ba2cb3685a30863eb19930cda diff --git a/src/Config.h b/src/Config.h index d0b4819..1efa486 100644 --- a/src/Config.h +++ b/src/Config.h @@ -5,7 +5,7 @@ #define NUKI_HUB_VERSION "9.12" #define NUKI_HUB_VERSION_INT (uint32_t)912 #define NUKI_HUB_BUILD "unknownbuildnr" -#define NUKI_HUB_DATE "2025-06-30" +#define NUKI_HUB_DATE "2025-07-02" #define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest" #define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json" diff --git a/src/WebCfgServer.cpp b/src/WebCfgServer.cpp index 1cd5ddc..993ebb4 100644 --- a/src/WebCfgServer.cpp +++ b/src/WebCfgServer.cpp @@ -128,8 +128,13 @@ bool WebCfgServer::isAuthenticated(PsychicRequest *request, int type) { struct timeval time; gettimeofday(&time, NULL); - int64_t time_us = (int64_t)time.tv_sec * 1000000L + (int64_t)time.tv_usec; - + int64_t time_us = 0; + + if (timeSynced) + { + time_us = (int64_t)time.tv_sec * 1000000L + (int64_t)time.tv_usec; + } + if ((type == 0 && _httpSessions[cookie].as() > time_us) || (type == 1 && _importExport->_duoSessions[cookie].as() > time_us) || (type == 2 && _importExport->_totpSessions[cookie].as() > time_us) || (type == 3 && _importExport->_bypassSessions[cookie].as() > time_us)) { return true;