From 0cf62d334d550a49fcf728925107b5f84ab43716 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 26 Jul 2021 13:38:35 -0400 Subject: [PATCH] Remove pointless check. --- controller/EmbeddedNetworkController.cpp | 26 +++++++++++------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp index a22b32207..9ff7420cd 100644 --- a/controller/EmbeddedNetworkController.cpp +++ b/controller/EmbeddedNetworkController.cpp @@ -1367,21 +1367,19 @@ void EmbeddedNetworkController::_request( std::string memberId = member["id"]; fprintf(stderr, "ssoEnabled && !ssoExempt %s-%s\n", nwids, memberId.c_str()); uint64_t authenticationExpiryTime = (int64_t)OSUtils::jsonInt(member["authenticationExpiryTime"], 0); - if (authenticationExpiryTime > 0) { - fprintf(stderr, "authExpiryTime: %lld\n", authenticationExpiryTime); - if (authenticationExpiryTime < now) { - if (!authenticationURL.empty()) { - Dictionary<3072> authInfo; - authInfo.add("aU", authenticationURL.c_str()); - fprintf(stderr, "sending auth URL: %s\n", authenticationURL.c_str()); - DB::cleanMember(member); - _db.save(member,true); - _sender->ncSendError(nwid,requestPacketId,identity.address(),NetworkController::NC_ERROR_AUTHENTICATION_REQUIRED, authInfo.data(), authInfo.sizeBytes()); - } - return; - } else if (authorized) { - _db.memberExpiring(authenticationExpiryTime, nwid, identity.address().toInt()); + fprintf(stderr, "authExpiryTime: %lld\n", authenticationExpiryTime); + if (authenticationExpiryTime < now) { + if (!authenticationURL.empty()) { + Dictionary<3072> authInfo; + authInfo.add("aU", authenticationURL.c_str()); + fprintf(stderr, "sending auth URL: %s\n", authenticationURL.c_str()); + DB::cleanMember(member); + _db.save(member,true); + _sender->ncSendError(nwid,requestPacketId,identity.address(),NetworkController::NC_ERROR_AUTHENTICATION_REQUIRED, authInfo.data(), authInfo.sizeBytes()); } + return; + } else if (authorized) { + _db.memberExpiring(authenticationExpiryTime, nwid, identity.address().toInt()); } }