lbryio / lbryio/wallet-sync-server
Address race conditions (including wallet encrypted with old password gets posted)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
I realized that there are a few ways that race conditions could (however unlikely) get around some enforcement in our code. The most important one is after a password change, preventing a client with the old password from posting a new wallet.
- Get a new auth token using an old password, despite a password change, and use it to post a new wallet encrypted with the same old password. - See here There could be a similar race condition where a client almost posts a wallet using an auth token that gets deleted by the password change transaction, but I think the Sequence value would save us from that.
- Stay connected to a websocket initiated during a password change using an auth token that's invalidated the password change - See here - Not important yet since all we do with the websocket is inform clients about new wallet updates. But, maybe we'll do more important things on the websocket later.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the password-change transaction and the wallet POST and websocket authentication paths referenced by the linked commit diffs. Trace token invalidation and sequence handling under concurrent requests; done means old-password wallet posts and invalidated websocket sessions are rejected consistently, with regression coverage for both races.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication, backend, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100