Skip to content

Conversation

@ekzyis
Copy link
Member

@ekzyis ekzyis commented Jul 17, 2025

Description

We were always using the old key to decrypt wallets if it was found.

This means that if device sync was enabled before #2169, the existing key could decrypt the migrated wallets.

However, when the passphrase is shown, we encrypt the wallets with a new key. Same is true on passphrase reset.

But on page load, we will still load the old key instead of the new key so the 'unlock wallets' prompt is shown.

This PR fixes this by only loading the old key if a new key was not found.

Checklist

Are your changes backward compatible? Please answer below:

yes

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:

8. We now always use the new key if it exists. If not but old key exists, we use that. Else we generate a new key.

For frontend changes: Tested on mobile, light and dark mode? Please answer below:

n/a

Did you introduce any new environment variables? If so, call them out explicitly here:

no

@ekzyis
Copy link
Member Author

ekzyis commented Jul 17, 2025

I'm not sure if this is the bug that siggy47, BlokchainB or OT experienced since they somehow recovered, but afaict, they cannot recover from this bug unless they manually deleted their browser data to wipe the old key and I don't think they did that.

@huumn huumn merged commit 075934e into master Jul 17, 2025
7 checks passed
@huumn huumn deleted the fix-old-key-overwrites-new-key branch July 17, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants