Implementing several adjustments for security reasons.

This commit is contained in:
stephb9959
2021-11-09 11:33:20 -08:00
parent 7b19143d6f
commit 45a50483be
34 changed files with 862 additions and 272 deletions

View File

@@ -25,10 +25,8 @@ namespace OpenWifi {
class SMSSender : public SubSystemServer {
public:
static SMSSender *instance() {
if (instance_ == nullptr) {
instance_ = new SMSSender;
}
return instance_;
static SMSSender instance;
return &instance;
}
int Start() final;
@@ -39,7 +37,6 @@ namespace OpenWifi {
bool IsNumberValid(const std::string &Number, const std::string &UserName);
[[nodiscard]] bool Send(const std::string &PhoneNumber, const std::string &Message);
private:
static SMSSender * instance_;
std::string Provider_;
bool Enabled_=false;
std::vector<SMSValidationCacheEntry> Cache_;