mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-10-30 02:12:32 +00:00
Merge pull request #59 from Telecominfraproject/WIFI-100079
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10079
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(owsec VERSION 2.7.0)
|
||||
project(owsec VERSION 2.6.0)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace OpenWifi {
|
||||
|
||||
bool SMSSender::StartValidation(const std::string &Number, const std::string &UserName) {
|
||||
std::lock_guard G(Mutex_);
|
||||
if(!Enabled_)
|
||||
return false;
|
||||
CleanCache();
|
||||
uint64_t Now=OpenWifi::Now();
|
||||
auto Challenge = MFAServer::MakeChallenge();
|
||||
@@ -56,6 +58,9 @@ namespace OpenWifi {
|
||||
bool SMSSender::IsNumberValid(const std::string &Number, const std::string &UserName) {
|
||||
std::lock_guard G(Mutex_);
|
||||
|
||||
if(!Enabled_)
|
||||
return false;
|
||||
|
||||
for(const auto &i:Cache_) {
|
||||
if(i.Number==Number && i.UserName==UserName)
|
||||
return i.Validated;
|
||||
@@ -66,6 +71,9 @@ namespace OpenWifi {
|
||||
bool SMSSender::CompleteValidation(const std::string &Number, const std::string &Code, const std::string &UserName) {
|
||||
std::lock_guard G(Mutex_);
|
||||
|
||||
if(!Enabled_)
|
||||
return false;
|
||||
|
||||
for(auto &i:Cache_) {
|
||||
if(i.Code==Code && i.Number==Number && i.UserName==UserName) {
|
||||
i.Validated=true;
|
||||
|
||||
Reference in New Issue
Block a user