Page MenuHomePhabricator

[lib] Make invalidSessionRecovery work with all recoveryActionSources handled by KeyserverConnectionHandler
ClosedPublic

Authored by ashoat on Mar 31 2024, 7:47 PM.
Tags
None
Referenced Files
F3393080: D11502.diff
Sat, Nov 30, 11:23 AM
Unknown Object (File)
Wed, Nov 27, 4:36 PM
Unknown Object (File)
Tue, Nov 12, 2:24 PM
Unknown Object (File)
Tue, Nov 12, 12:44 PM
Unknown Object (File)
Tue, Nov 12, 10:38 AM
Unknown Object (File)
Tue, Nov 12, 10:09 AM
Unknown Object (File)
Tue, Nov 12, 8:56 AM
Unknown Object (File)
Tue, Nov 12, 8:37 AM
Subscribers
None

Details

Summary

All of recoveryActionSourcess handled by KeyserverConnectionHandler have been unified to use the same code. This means that if invalidSessionRecovery works for two of them, it should work with all of them.

Depends on D11501

Test Plan
  1. Careful inspection of codepaths to confirm that these action sources are handled in the same way
  2. Checked changing the Flow type of actionCurrentUserInfo in invalidSessionRecovery to be a required param. Inspected new type errors to confirm that they would not occur here
  3. Same testing as the rest of the stack:
    1. Set up multi-keyserver environment following Notion doc
    2. Test native keyserver recovery via keyserverAuth by deleting a cookie in MariaDB console
    3. Hardcode incorrect userID, try same test as B, and confirm that it fails
    4. Test web keyserver recovery in the same way as in B
    5. Test incorrect userID on web in the same way as in C

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added inline comments.
lib/shared/session-utils.js
93–112 ↗(On Diff #38615)

It is quite easy to introduce a bug in this long if condition. Maybe we can introduce a Set (with a descriptive name) which makes it more maintainable?

This revision is now accepted and ready to land.Apr 2 2024, 3:02 AM