Page MenuHomePhabricator

[keyserver] Introduce input id conversion
ClosedPublic

Authored by michal on May 4 2023, 8:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 22, 8:15 PM
Unknown Object (File)
Thu, Jun 20, 3:23 PM
Unknown Object (File)
Thu, Jun 20, 3:00 PM
Unknown Object (File)
Wed, Jun 12, 4:45 PM
Unknown Object (File)
Wed, Jun 12, 6:54 AM
Unknown Object (File)
Thu, Jun 6, 4:07 PM
Unknown Object (File)
Tue, May 28, 12:03 PM
Unknown Object (File)
Sat, May 25, 2:27 PM
Subscribers

Details

Summary

Modifies the validateInput function to also convert the id schema (conversion is locked behind a flag for now)

  • Now validateInput asserts the flow type of the input after validation which allows us to change any to mixed in responder input and remove the cast
  • In two places in user-responders validateInput was called with null validator and input. To simplify the validateInput function generic typing I've replaced them with direct calls to verifyClientSupported, which is what was happening anyways

Depends on D7713

Test Plan

Test web app and ios emulator and check for any server errors.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

michal requested review of this revision.May 4 2023, 8:40 AM
tomek added inline comments.
lib/types/entry-types.js
99 ↗(On Diff #26072)

Why are we adding these?

This revision is now accepted and ready to land.May 5 2023, 12:55 AM

Sorry should have mentioned this. There are added because flow types and validators are not in sync. These properties were removed at one point and aren't used. They still exist in the validators so we can support older clients.
Now that tShape<T> is checking if properties count and names match between the flow type and the validator we get an error. Adding empty makes them match, while still blocks the rest of the code from using these values, because they are empty.