TOTP: handle empty string

This commit is contained in:
He4eT 2026-03-25 19:22:26 +01:00
commit b665aeb521

2
bwc
View file

@ -35,7 +35,7 @@ process_item () {
echo "Password copied to clipboard."
local totp=$(jq -r ".login.totp" <<< $login)
if [[ $totp != "null" ]]; then
if [[ $totp != "" && $totp != "null" ]]; then
read -s -k $'?Press any key to copy the TOTP Token...\n'
bw get totp $id --session $sessionkey | xclip -sel clip
echo "Token copied to clipboard."