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
Unknown Object (File)
Tue, May 7, 4:32 PM
Unknown Object (File)
Apr 11 2024, 4:04 PM
Unknown Object (File)
Apr 10 2024, 10:57 PM
Unknown Object (File)
Apr 10 2024, 2:14 PM
Unknown Object (File)
Apr 10 2024, 10:20 AM
Unknown Object (File)
Apr 8 2024, 9:10 PM
Unknown Object (File)
Apr 8 2024, 4:01 PM
Unknown Object (File)
Apr 8 2024, 12:22 PM
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
Lint Not Applicable
Unit
Tests Not Applicable

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