Issue with 5 digit (or less) keys

Issue #33 resolved
Chris Batchelor
created an issue

When attempting to use a key that happens to be 5 digits or less the value pasted (at least via autotype) does not include the preceding 0's. As a result, the number entered is incorrect and causes a validation failure.

Could we have an option to force preceding 0's for a system that requires it? I'm not certain if all systems will require it, but the one I'm using this on, right now, fails on 5 digit numbers.

Comments (4)

  1. Devin Martin repo owner

    In code I'm seeing that in all cases (at least that I saw) we are handling this case by padding with 0's up to the data field size (I'm assumign 6 in this case). Can you please give more explicit steps to re-produce?

  2. Chris Batchelor reporter

    Due to the semi-randomness of the numbers, there's no way to give a definite repro.

    What I have setup is:

    1. In KeePass, I have an entry setup with a URL set to the appropriate application. In this case: "cmd://"T:\Games\Star Wars-The Old Republic\launcher.exe""
    2. In right click on the entry and choose "Timed One Time Password." After entering the appropriate key, it begins to generate the correct TOTP keys.
    3. In the entry's Auto-Type tab, I have the sequence for the launcher's window (and the "Override default sequence") set to: "{USERNAME}{TAB}{PASSWORD}{TAB}{TOTP}{TAB}{TAB}{ENTER}"
    4. I run the application mentioned in step 1, and after it launches, hit Ctrl Shift A (Global auto-type)
    5. The username, password, and security key are typed in, and the launcher goes to the next screen.
    6. In the case that the key is 5 digits (or less?), it enters only the 5 digits, with no preceding 0, and fails the security check and goes to a screen that asks, only, for the correct security key. I must then go to KeePass, manually, to get this value. In all other cases, it succeeds.
  3. Log in to comment