mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
dont generate nonce for deleted members
This commit is contained in:
parent
e1af003e4f
commit
a2ffe8c05e
1 changed files with 1 additions and 1 deletions
|
@ -357,7 +357,7 @@ std::string PostgreSQL::getSSOAuthURL(const nlohmann::json &member, const std::s
|
||||||
std::string nonce = "";
|
std::string nonce = "";
|
||||||
|
|
||||||
// check if the member exists first.
|
// check if the member exists first.
|
||||||
pqxx::row count = w.exec_params1("SELECT count(id) FROM ztc_member WHERE id = $1 AND network_id = $2", memberId, networkId);
|
pqxx::row count = w.exec_params1("SELECT count(id) FROM ztc_member WHERE id = $1 AND network_id = $2 AND deleted = false", memberId, networkId);
|
||||||
if (count[0].as<int>() == 1) {
|
if (count[0].as<int>() == 1) {
|
||||||
// find an unused nonce, if one exists.
|
// find an unused nonce, if one exists.
|
||||||
pqxx::result r = w.exec_params("SELECT nonce FROM ztc_sso_expiry "
|
pqxx::result r = w.exec_params("SELECT nonce FROM ztc_sso_expiry "
|
||||||
|
|
Loading…
Add table
Reference in a new issue