From b8a46455455cd989271ddd981a7c4bef4e93b7e5 Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Fri, 27 Mar 2026 19:48:44 -0600 Subject: [PATCH] ADDED CL;ENUP TO PASSCHECK --- customscripts/passcheck | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/customscripts/passcheck b/customscripts/passcheck index 4598a9e..5f4ba98 100644 --- a/customscripts/passcheck +++ b/customscripts/passcheck @@ -1,4 +1,8 @@ #!/bin/bash +set -E p # FAIL ON ERROR USE TRAP +# error handling trap +trap 'echo "ERROR ON $LINENO! UNSETTING VARS FOR SECURITY"; unset $passphrase1; unset $passphrase2; unset $complexity_check; unset $sha1_digest; unset $first_five; unset $last_35; unset $curl_ret; echo "DONE"; exit 1' ERR + pass_min_length=40 hibp_api="https://api.pwnedpasswords.com/range/" @@ -52,4 +56,15 @@ if grep -q -i "${last_35}" <<< "${curl_ret}"; then else echo "PASS CHECKS OUT" exit 0 -fi \ No newline at end of file +fi + +# cleanup +echo -e "\nUNSETTING VARS FOR SECURITY\n"; +unset $passphrase1 +unset $passphrase2 +unset $complexity_check +unset $sha1_digest +unset $first_five +unset $last_35 +unset $curl_ret; +echo -e "\nDONE\n" \ No newline at end of file