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::vector<SecurityObjects::ActionLink> Links;
{ {
std::lock_guard G(Mutex_); std::lock_guard G(Mutex_);
Storage()->GetActions(Links); Storage().GetActions(Links);
} }
std::cout << __func__ << ":" << __LINE__ << std::endl; std::cout << __func__ << ":" << __LINE__ << std::endl;

View File

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