From a5e9841738f5ab0a94372d7ed2d0704ff9aa805c Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Fri, 4 Aug 2023 19:38:11 -0400 Subject: [PATCH] substr reset pin --- wrenchboard/src/shared_tool/account.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wrenchboard/src/shared_tool/account.cc b/wrenchboard/src/shared_tool/account.cc index 1ac35658..abeecf48 100644 --- a/wrenchboard/src/shared_tool/account.cc +++ b/wrenchboard/src/shared_tool/account.cc @@ -1127,8 +1127,7 @@ long WrenchResetMemberPass(CVars in, CVars &out) { xx["loc"].set_valid(true); xx["reset_pin"] = reset_pin; xx["reset_pin"].set_valid(true); - xx["reset_pin"] = xx["reset_pin"].substr(xx["reset_pin"].length() - 6, 6); - // v["digits"] = in["cardnumber"].substr(in["cardnumber"].length() - 4, 4); + xx["reset_pin"] = xx["reset_pin"].substr(0, 5); out["password_reset_id"] = insert_db_record(DBS_VALID, "password_reset", "password_reset_id_seq", xx);