Implementing several adjustments for security reasons.

This commit is contained in:
stephb9959
2021-11-09 11:50:39 -08:00
parent 9e7d7ba67d
commit f80a0c5007
2 changed files with 9 additions and 1 deletions

View File

@@ -34,7 +34,7 @@ std::cout << __func__ << ":" << __LINE__ << std::endl;
std::vector<SecurityObjects::ActionLink> Links;
{
std::lock_guard G(Mutex_);
Storage()->GetActions(Links);
Storage().GetActions(Links);
}
std::cout << __func__ << ":" << __LINE__ << std::endl;

View File

@@ -46,15 +46,23 @@ namespace OpenWifi {
bool Storage::CreateAction( SecurityObjects::ActionLink & A) {
try {
std::cout << __func__ << ":" << __LINE__ << std::endl;
Poco::Data::Session Sess = Pool_->get();
std::cout << __func__ << ":" << __LINE__ << std::endl;
Poco::Data::Statement Insert(Sess);
std::cout << __func__ << ":" << __LINE__ << std::endl;
std::string St2{
"INSERT INTO ActionLinks (" + AllActionLinksFieldsForSelect + ") VALUES(" + AllActionLinksValuesForSelect + ")"};
std::cout << __func__ << ":" << __LINE__ << std::endl;
ActionLinkRecord AR;
std::cout << __func__ << ":" << __LINE__ << std::endl;
Convert(A, AR);
std::cout << __func__ << ":" << __LINE__ << std::endl;
Insert << ConvertParams(St2),
Poco::Data::Keywords::use(AR);
std::cout << __func__ << ":" << __LINE__ << std::endl;
Insert.execute();
std::cout << __func__ << ":" << __LINE__ << std::endl;
return true;
} catch (const Poco::Exception &E) {
Logger_.log(E);