fix for codes that include a username/email

This commit is contained in:
Amarpreet Minhas 2022-10-20 18:48:47 -04:00
parent 1b8c53f29a
commit b3a9d1010b

2
otpish
View file

@ -61,7 +61,7 @@ fi
if [ "${COMMAND}" = "get" ]; then
if [ -z ${NAME} ]; then echo get requires a name; exit; fi
if ! [ -f ${OTP} ]; then echo no otps configured add one first; exit; fi
uri=$(age -i ${PRIVKEY} -d ${OTP} | grep "/${NAME}?")
uri=$(age -i ${PRIVKEY} -d ${OTP} | grep "/${NAME}")
otp_info=$(echo -n ${uri} | cut -d '?' -f 2)
oIFS=${IFS}
IFS="&"