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)
Sun, Nov 24, 5:51 AM
Unknown Object (File)
Fri, Nov 22, 5:41 PM
Unknown Object (File)
Mon, Nov 18, 10:35 AM
Unknown Object (File)
Mon, Oct 28, 8:38 AM
Unknown Object (File)
Oct 13 2024, 4:47 AM
Unknown Object (File)
Oct 12 2024, 4:50 PM
Unknown Object (File)
Sep 28 2024, 3:09 PM
Unknown Object (File)
Sep 28 2024, 3:09 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.