issue: https://linear.app/comm/issue/ENG-5282/refactor-getversion-action
We need to get from the keyserver the username and id of the owner.
getVersion action is called before we have ever talked to the keyserver - we don't know its id, we don't have a cookie or session set, we don't have an entry for it in the keyserver store. To use the useKeyserverCall we create a temporary entry. We could probably do this better, but I'm low on time and I don't think it's worth doing now. This solution won't make it harder to upgrade later.
This mirors how it was done before in useServerCall, but there we were also sending the cookie and any other values that were already in our store, nevermind it was for a different keyserver potentially. This was actually a security breach
Details
Details
Passed parramOverride to useKeyserverCall:
{ keyserverInfos: { [TEMPORARY_KS_ID]: { urlPrefix: 'http://localhost:3000/comm', }, }, }
and called the action. Checked that the correct values are returned from the keyserver.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
keyserver/src/responders/version-responders.js | ||
---|---|---|
21–26 ↗ | (On Diff #32507) | Why are these two Promises being run sequentially? Does one depend on the other? |
lib/actions/device-actions.js | ||
---|---|---|
71 ↗ | (On Diff #32642) | I think not shortening keyserver to KS would be clearer but up to you |
lib/actions/device-actions.js | ||
---|---|---|
76–78 ↗ | (On Diff #32642) | Does that mean that we can try to connect to only one keyserver at a time? |
lib/actions/device-actions.js | ||
---|---|---|
76–78 ↗ | (On Diff #32642) | According to the designs and the discussion in them, we can be only adding one keyserver at a time. |