question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some code become Invalid after set a password

See original GitHub issue

This bug can be reproduced in the latest code in dev branch

<del>1. Export an encrypted backup 2. Open a new Authenticator instance (do a rest before test, make sure no password is set in Authenticator) 3. Import the backup with correct password 4. Set a different password in security menu 5. Some code become Invalid</del>

This bug won’t make all code Invalid, but all code are broken with incorrect results.

Update:

This issue has no relationship with import backups.

It seems when we set a password, we failed to set encrypted flag for existing entries.

  1. Open a new Authenticator instance (do a rest before test, make sure no password is set in Authenticator)
  2. Add a new account
  3. Set a password in security menu
  4. Execute chrome.storage.sync.get(console.log) to see result

The existing account secret has been encrypted, but the encrypted flag is still set to false.

Still digging

Update2:

The latest code has fixed this issue. This issue doesn’t affect any published versions of Authenticator.

The root cause of this bug is because we retired encrypted flag and use a new field encSecret to handle detecting encrypted secret. There is a logic mistake to migrate this change. We have also created a new issue to remove encrypted flag to make the logic clear.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Sneezrycommented, May 21, 2020

Emmm, we retired encrypted flag and have a new field to handle encrypted secret. This makes sense. I think we can do a migration when import backups, and remove all logic about encrypted flag.

0reactions
Sneezrycommented, May 21, 2020

I have verified the latest code has fixed this issue. This issue doesn’t affect any published versions of Authenticator.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Invalid Code. Try Again." error message when trying to login ...
The "Invalid Code" error message appears because the passcode verification failed. The passcode is generated according to phone's time and each ...
Read more >
Why Am I Getting "Invalid Password"? - YouTube
" Invalid password " messages frustrate a lot of people, particularly when they're certain they've typed in the right thing.
Read more >
Invalid Security Code for Microsoft 365, Intune, or Azure
"Invalid Security Code" error when you reset your admin password for Microsoft 365, Intune, or Azure. Article; 07/21/2022; 2 minutes to read
Read more >
Getting "Invalid verification code." on password reset
After a password reset, it was trying to redirect back to the Set Password screen with the reset token, resulting in the error....
Read more >
Why do I see the error “The passcode you entered is invalid ...
You entered the passcode incorrectly. Please verify that you entered a valid passcode. No space should be included between characters when you input...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found