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

Own knock or invite event in knock_state or invite_state in /sync is not stripped #14919

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

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 20, 2023

This issue has been migrated from #14919.


Description

https://github.com/matrix-org/synapse/blob/19c0e55ef7742d67cff1cb6fb7c3e862b86ea788/synapse/rest/client/sync.py#L345 does not strip the invite event it is pulling the invite_state from. The same thing happens for knocking.

grafik

grafik

This is then sent to clients via /sync. According to the spec all events in invite/knock_state should be stripped. There are benefits to the client having access to the timestamp of the invite however, so some might be relying on this, but strictly speaking this is a spec violation and looks like a bug.

Spec: https://spec.matrix.org/v1.5/client-server-api/#get_matrixclientv3sync

Steps to reproduce

  • get invited or knock a room
  • look at the sync response

Homeserver

neko.dev

Synapse Version

1.74

Installation Method

Other (please mention below)

Database

postgres, single

Workers

Multiple workers

Platform

Gentoo

Configuration

Can be reproduced on various configurations

Relevant log output

Screenshots and link to the offending code above, no logs about it, since it is a spec compliance issue.

Anything else that would be useful to know?

No response

@matrixbot matrixbot changed the title Dummy issue Own knock or invite event in knock_state or invite_state in /sync is not stripped 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