mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
py3: ipa_otptoken_import: fix calling unicode on bytes
.decode() must be used instead https://pagure.io/freeipa/issue/4985 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
@@ -315,7 +315,11 @@ class PSKCKeyPackage(object):
|
||||
('model', 'ipatokenmodel', lambda v, o: v.strip()),
|
||||
('serial', 'ipatokenserial', lambda v, o: v.strip()),
|
||||
('issueno', 'ipatokenserial', lambda v, o: o.get('ipatokenserial', '') + '-' + v.strip()),
|
||||
('key', 'ipatokenotpkey', lambda v, o: unicode(base64.b32encode(v))),
|
||||
(
|
||||
'key',
|
||||
'ipatokenotpkey',
|
||||
lambda v, o: base64.b32encode(v).decode('ascii')
|
||||
),
|
||||
('digits', 'ipatokenotpdigits', lambda v, o: v),
|
||||
('algorithm', 'ipatokenotpalgorithm', lambda v, o: v),
|
||||
('counter', 'ipatokenhotpcounter', lambda v, o: v),
|
||||
|
||||
Reference in New Issue
Block a user