Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Conversation

@BtbN
Copy link
Contributor

@BtbN BtbN commented Jul 23, 2023

As per the spec: https://spec.matrix.org/v1.7/rooms/v10/#authorization-rules

"If membership is leave"
->
"If the sender matches state_key, allow if and only if that user’s current membership state is invite, join, or knock."

I.e. a user can kick themselves. Bridges use this to make a user leave while giving a reason.

Some recent change (likely 8ea1a11 but I'm not 100% sure) changed that behaviour, resulting in heisenbridge being unable to make users leave while giving a reason.
This works fine on Synapse.

As per the spec: https://spec.matrix.org/v1.7/rooms/v10/#authorization-rules

"If membership is leave"
->
"If the sender matches state_key, allow if and only if that user’s
current membership state is invite, join, or knock."

I.e. a user can kick themselves. Bridges use this to make a user leave
while giving a reason.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
@BtbN BtbN requested a review from a team as a code owner July 23, 2023 17:52
@codecov
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (7863a40) 65.71% compared to head (f84b16d) 65.71%.
Report is 2 commits behind head on main.

Files Patch % Lines
clientapi/routing/membership.go 25.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3157   +/-   ##
=======================================
  Coverage   65.71%   65.71%           
=======================================
  Files         507      507           
  Lines       57291    57291           
=======================================
  Hits        37651    37651           
  Misses      15830    15830           
  Partials     3810     3810           
Flag Coverage Δ
unittests 49.50% <25.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kegsay kegsay merged commit c4528b2 into matrix-org:main Nov 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants