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)
Sat, Apr 6, 6:06 PM
Unknown Object (File)
Fri, Apr 5, 8:02 PM
Unknown Object (File)
Fri, Apr 5, 4:37 AM
Unknown Object (File)
Wed, Apr 3, 4:28 PM
Unknown Object (File)
Wed, Apr 3, 9:12 AM
Unknown Object (File)
Tue, Apr 2, 11:41 PM
Unknown Object (File)
Mon, Apr 1, 1:11 PM
Unknown Object (File)
Sun, Mar 31, 6:09 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka added inline comments.
lib/reducers/keyserver-reducer.js
443–444 ↗(On Diff #38444)

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.