winauth icon indicating copy to clipboard operation
winauth copied to clipboard

Doesn't correctly decode the label in an otpauth:// URI

Open Sam-Hall opened this issue 7 years ago • 1 comments

According to this the label is "URI-encoded string": https://github.com/google/google-authenticator/wiki/Key-Uri-Format

However, if I paste in my URI and click Decode, WinAuth doesn't correctly decode the label. Space characters appear as %20 for instance.

To reproduce:

  1. Add new "Authenticator"
  2. Paste in "otpauth://totp/My%20Label?secret=AAAAAAAAAAAAAAAA"
  3. Click "Decode"
  4. Click "Verify Authenticator"
  5. Notice the name is "My%20Label" instead of "My Label"

Sam-Hall avatar Sep 01 '17 03:09 Sam-Hall

I've just noticed that this leads to another bug as WinAuth then doesn't split the label if the colon is escaped, represented by %3A. So instead of ending up with the Name: My Label (My Username) you end up with a very ugly Name: My Label (My%20Label%3AMy%20Username) entry.

Sam-Hall avatar Sep 01 '17 03:09 Sam-Hall