Page MenuHomePhabricator

[lib] Wipe keyserver store on login
ClosedPublic

Authored by inka on Mar 28 2024, 7:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 1, 6:30 PM
Unknown Object (File)
Sun, Dec 1, 3:05 PM
Unknown Object (File)
Wed, Nov 13, 12:48 PM
Unknown Object (File)
Tue, Nov 12, 9:39 PM
Unknown Object (File)
Tue, Nov 12, 9:39 PM
Unknown Object (File)
Tue, Nov 12, 9:39 PM
Unknown Object (File)
Oct 11 2024, 11:31 AM
Unknown Object (File)
Oct 11 2024, 11:31 AM
Subscribers

Details

Summary

issue: ENG-7531
Because keyserverStore is excluded from being wiped by resetUserSpecificState on both web and native, we need to handle it in its reducer.
We wipe it on login and register actions for the same reason why we wipe all other stores - in case logout success doesn't manage to come before the user manages to login, we don't want the second user to see the data of the previous user

Test Plan

Forced logout siccess to be discarded (this is how I initially encountered the bug - identityInvalidSessionDowngrade would discard the action)

Before my changes, if I logged onto a user, I could see in their keyserver list all keyservers the previous user had added
After my changes, the second user had only the auth keyserver in their store

Diff Detail

Repository
rCOMM Comm
Branch
inka/local_minimal_testing_multiple_keyservers
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

inka added inline comments.
lib/reducers/keyserver-reducer.js
443–444

We don't want a recovery login to wipe redux

inka requested review of this revision.Mar 28 2024, 7:22 AM
This revision is now accepted and ready to land.Mar 29 2024, 4:08 AM
This revision was automatically updated to reflect the committed changes.