Bug 2162898 - Selecting an entry by number doesn't work.
Summary: Selecting an entry by number doesn't work.
Keywords:
Status: CLOSED DUPLICATE of bug 2162909
Alias: None
Product: Fedora
Classification: Fedora
Component: ykocli
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gerald Cox
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-21 22:06 UTC by Björn Persson
Modified: 2023-01-22 01:37 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-01-22 01:37:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Björn Persson 2023-01-21 22:06:14 UTC
Description of problem:
Selecting an entry by numeric index does not result in a one-time passcode. Ykocli doesn't seem to notice the error.

Version-Release number of selected component:
1.1.1-1.fc37

How reproducible:
Every time.

Steps to Reproduce:
ykocli totp

Actual results:
Choose an entry below:
index=0  ====> Foo          [Requires
index=1  ====> Bar          [Requires
index=2  ====> Baz          [Requires
index=3  ====> Qux          [Requires
index=4  ====> Nemo:övning  [Requires

Enter desired numeric index value and press 
[ENTER]:  2
^C
Entry Baz          [Requires has been selected
TOTP token  is now in the clipboard

I'm not prompted to touch the Yubikey, no digits are printed in the terminal, and nothing is pasted when I press Ctrl-V.

Expected results:
A prompt to touch the Yubikey, and then a valid one-time passcode.

Additional info:
There seem to be two defects in play here. First, it seems that Ykocli fails to provide correct parameters to Ykman. Second, Ykocli doesn't notice that no one-time passcode was generated, and continues as if all were well.

A good programmer will fix the error handling first, to detect the error and print an informative error message if similar errors happen in the future – and then fix the root cause so that the error won't happen again.

Comment 1 Gerald Cox 2023-01-22 01:19:05 UTC
There is no logic in the program to handle TOTP codes that require a touch.  I'll take a look at it. I appreciate you testing and opening reports, but it isn't helpful to throw shade.

Comment 2 Gerald Cox 2023-01-22 01:37:17 UTC

*** This bug has been marked as a duplicate of bug 2162909 ***


Note You need to log in before you can comment on or make changes to this bug.