~martijnbraam/public-inbox

Allow empty issuer in andotp import v1 APPLIED

Lorenzo Martinico: 1
 Allow empty issuer in andotp import

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~martijnbraam/public-inbox/patches/27449/mbox | git am -3
Learn more about email & git

[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: