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)
Wed, Apr 24, 10:45 AM
Unknown Object (File)
Mon, Apr 22, 1:42 AM
Unknown Object (File)
Fri, Apr 19, 11:37 PM
Unknown Object (File)
Tue, Apr 16, 8:45 AM
Unknown Object (File)
Sun, Apr 14, 7:58 AM
Unknown Object (File)
Sat, Apr 13, 2:01 AM
Unknown Object (File)
Fri, Apr 12, 4:35 AM
Unknown Object (File)
Tue, Apr 9, 9:20 AM
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.