#1000187 yubikey-manager: Exception when trying to add an oath account

#1000187#5
Date:
2021-11-19 11:51:46 UTC
From:
To:
Dear Maintainer,

   $ ykman oath accounts add foo bar

always results in

   AttributeError: 'OATH_TYPE' object has no attribute 'upper'

The only way to prevent this is to explicitly pass both oath type and
algorithm:

   $ ykman oath accounts -o TOTP -a SHA1 add foo bar

#1000187#10
Date:
2021-11-28 06:56:51 UTC
From:
To:
Hi Tobias,

Can you try again with yubikey-manager 4.0.7-1 (currently in unstable
and testing)? I'm unable to reproduce your issue there, and seem to be
able to successfully add an account, once I figured out a valid format
for the secret:

$ echo '123456' | base64
MTIzNDU2Cg==
$ ykman oath accounts add foo 'MTIzNDU2Cg=='
$ echo $?
0
$ ykman oath accounts list
foo

Florian

#1000187#15
Date:
2021-11-28 12:56:36 UTC
From:
To:
I can verify that this issue does not existing in testing. Is it
possible to packport a fix to stable?

thanks
tobias

#1000187#24
Date:
2021-11-29 05:27:48 UTC
From:
To:
Hi Tobias,

thanks for confirming.

I can probably upload version 4.0.7 to bullseye-backports, would that be
useful for you? Updating the version in stable requires a targeted fix,
and from a quick glance I fail to see where things go wrong in
4.0.0~a1-4 and what exactly has been fixed. (Are you sure this isn't
just a fixed error message, or are you using something else as the value
for SECRET?)

Florian

#1000187#29
Date:
2021-11-29 18:06:24 UTC
From:
To:
I also checked and couldn't find a targeted fix. An upload to
bullseye-backports would be very helpful though!

thanks,
tobias

#1000187#36
Date:
2022-06-20 03:29:23 UTC
From:
To:
close 1000187
thanks

version 4.0.7-1 confirmed to fix issue, backport is now available as well