Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

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

Open
deepbluev7 opened this issue Jan 26, 2023 · 1 comment
Labels
A-Spec-Compliance places where synapse does not conform to the spec O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@deepbluev7
Copy link
Contributor

Description

async def encode_invited(
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

@clokep
Copy link
Contributor

clokep commented Jan 26, 2023

It took me a minute to find the problem so I'm going to re-iterate that only your own m.room.member event is not stripped. The other events are properly stripped. I don't see anything in the spec saying to treat your own event differently, so I agree this is a bug.

@clokep clokep added A-Spec-Compliance places where synapse does not conform to the spec S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. O-Occasional Affects or can be seen by some users regularly or most users rarely labels Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Spec-Compliance places where synapse does not conform to the spec O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

No branches or pull requests

2 participants