Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused legacy fallback code for public_key response to /_matrix/identity/v2/store-invite #6036

Open
matrixbot opened this issue Dec 17, 2023 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 17, 2023

This issue has been migrated from #6036.


Noticed by @richvdh during review of https://github.com/matrix-org/synapse/pull/5979/files#r323956886

https://github.com/matrix-org/synapse/blob/c755955f335984dc6f97a269b57ad955f257ef8f/synapse/handlers/room_member.py#L1037-L1047

https://github.com/matrix-org/synapse/blob/c755955f335984dc6f97a269b57ad955f257ef8f/synapse/handlers/room_member.py#L873-L876


Original comment:

while I'm here (it's not really relevant to the review, but): wtf is going on here?

  1. public_key isn't specced anywhere, afaict
  2. if public_key isn't set, we set fallback_public_key to public_keys[0] which, according to the spec, has a completely different shape to what we claim to return. (Edit: fixed by Corrections to the response format of /_matrix/identity/v2/store-invite matrix-org/matrix-spec#1486)

The calling code seems to imply that fallback_public_key is only used to populate some fields "For backwards compatibility", but said fields are in the spec.

I'm not suggesting changing anything here as part of this PR, but it looks like there's some bogosity, which suggests to me that the code is either unused (so can be killed) or broken (so should be fixed).

@matrixbot matrixbot changed the title Dummy issue Unused legacy fallback code for public_key response to /_matrix/identity/v2/store-invite Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant