HomePhabricator
Diffusion Comm c604bb8def6a

[keyserver] Make sure to reset session when lastUpdate is 0

Description

[keyserver] Make sure to reset session when lastUpdate is 0

Summary:
See the code comment. This situation can happen after registration, where it would be harmless to do a session reset. And it can happen if policies are not acknowledged at the time of a login, in which case we really to reset it after the policies are acknowledged.

Depends on D12388

Test Plan:
Prior to this, my test plan in D12386 would repopulate some data, but not all data. The issue is that we were treating it as an INCREMENTAL rather than FULL, but INCREMENTAL was not possible from time 0 because some of the updates since that point had been deleted.

In additional to that, I did some work to verify the safety of this change:

  1. I tested registration via the new registration flow, and confirmed that nothing weird happened (this is the other case where serverTime is set to 0)
  2. I looked through the login/registration code on keyserver and on the client to confirm that there were only two cases where serverTime was set to 0

Reviewers: kamil

Reviewed By: kamil

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D12389

Details

Provenance
ashoatAuthored on Mon, Jun 10, 8:41 PM
Reviewer
kamil
Differential Revision
D12389: [keyserver] Make sure to reset session when lastUpdate is 0
Parents
rCOMM7a89c9de9bb6: [lib] Set new session if received from fetch_pending_updates
Branches
Unknown
Tags
Unknown