Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add username sanity check on vault save to prevent db corruption between user sessions #481

Closed
lanedirt opened this issue Dec 19, 2024 · 0 comments · Fixed by #482
Closed
Labels
enhancement New feature or request

Comments

@lanedirt
Copy link
Owner

When you are logged into one account, then on another tab in the same browser session attempt to logout and login with a different account, corruption can occur when trying to save a vault on the original tab. This is because only one session is supported within a browser at a time.

When a user would try to update and save their vault on the original tab it will try to save an encrypted database blob to another user that will no longer be able to get decrypted because of different encryption keys used.

To prevent this we should add a username sanity check on all vault save actions so the client provides the username that is the owner of the encrypted vault blob. If this provided username does not match the actual username of the currently logged in user (as determined by API access token) the update should be rejected.

@lanedirt lanedirt added the enhancement New feature or request label Dec 19, 2024
@lanedirt lanedirt changed the title Add username sanity check on vault save to prevent corruption between user sessions Add username sanity check on vault save to prevent db corruption between user sessions Dec 19, 2024
lanedirt added a commit that referenced this issue Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant