[PATCH] Allow empty issuer in andotp import
Export this patch
---
contrib/andotp.py | 2 + -
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/andotp.py b/contrib/andotp.py
index a98e004..337ec0d 100755
--- a/contrib/andotp.py
+++ b/contrib/andotp.py
@@ -10,7 +10,7 @@ for item in items:
label = quote(item["label"])
secret = item["secret"]
url = f"otpauth://totp/{label}?secret={secret}"
- if item["issuer"]:
+ if "issuer" in item:
issuer = quote(item["issuer"])
url += f"&issuer={issuer}"
print(url)
--
2.31.1
Thanks, applied. I've slightly modified it to also check if issuer is
not empty/null to make the checking complete.
On 12/17/21 17:24, Lorenzo Martinico wrote: