Reset secret if decrypt failed

This commit is contained in:
斟酌 鵬兄 2024-07-11 06:54:47 +08:00
parent 7257ab62bc
commit ec489a9530

View File

@ -128,6 +128,11 @@ function _kstoredec {
fi
openssl enc -d -aes-256-cbc -pbkdf2 -k "$_AUTH_SECRET" -a -A
_code=$?
if [ $_code -ne 0 ]; then
_AUTH_SECRET=
return $_code
fi
}
function _kstoresecret-auto {