Page MenuHomePhabricator

[keyserver] Introduce input id conversion
ClosedPublic

Authored by michal on May 4 2023, 8:21 AM.
Tags
None
Referenced Files
F3521044: D7714.diff
Mon, Dec 23, 2:10 AM
Unknown Object (File)
Thu, Dec 19, 1:31 PM
Unknown Object (File)
Sun, Dec 15, 9:36 PM
Unknown Object (File)
Sun, Dec 15, 9:36 PM
Unknown Object (File)
Sun, Dec 15, 9:35 PM
Unknown Object (File)
Sun, Dec 15, 9:17 PM
Unknown Object (File)
Sun, Dec 15, 4:05 AM
Unknown Object (File)
Sat, Dec 14, 3:00 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.