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

Federation 'send_join' is insufficiently pedantic (SYN-507) #1407

Open
matrixbot opened this issue Oct 27, 2015 · 4 comments
Open

Federation 'send_join' is insufficiently pedantic (SYN-507) #1407

matrixbot opened this issue Oct 27, 2015 · 4 comments
Labels
A-Federated-Join joins over federation generally suck A-Spec-Compliance places where synapse does not conform to the spec A-Validation 500 (mostly) errors due to lack of event/parameter validation O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. Z-Cleanup Things we want to get rid of, but aren't actively causing pain

Comments

@matrixbot
Copy link
Member

In the process of writing a wire-level federation test in sytest to check the room join dance of synapse, I have ended up with a "minimal viable case" test (https://github.com/matrix-org/sytest/blob/paul/federation/tests/50federation/30room-join.pl).

This test appears to be too small in places, and is missing things that we feel synapse ought to require. This bug exists to track those things it should be checking, that this test demonstrates it currently does not.

synapse does not notice any of the following mistakes:

  • missing m.room.member event for the room creator.
  • missing m.room.power_levels event.
  • m.room.member event of joining user has depth of 1.
  • all auth_events have a depth of 0.
  • joining server does not hash or sign the event submitted to send_join.
  • the state key returned by send_join can be an empty object, or an empty list.

(Imported from https://matrix.org/jira/browse/SYN-507)

(Reported by @leonerd)

@matrixbot
Copy link
Member Author

Jira watchers: @leonerd

@matrixbot
Copy link
Member Author

Actually, this seems not quite true.

While send_join appears to be happy, and causes the joining HS to return a 200 OK to the requesting client along with the room ID, any subsequent queries by the user's client on their HS seem to reply with 403 "user is not in the room".

-- @leonerd

@matrixbot
Copy link
Member Author

Ugh. I retract my previous comment. It was working fine if I actually use the room ID, not the room alias.

-- @leonerd

@matrixbot matrixbot changed the title Federation 'send_join' is insufficiently pedantic (SYN-507) Federation 'send_join' is insufficiently pedantic (https://github.com/matrix-org/synapse/issues/1407) Nov 7, 2016
@matrixbot matrixbot changed the title Federation 'send_join' is insufficiently pedantic (https://github.com/matrix-org/synapse/issues/1407) Federation 'send_join' is insufficiently pedantic (SYN-507) Nov 7, 2016
@richvdh richvdh added the A-Validation 500 (mostly) errors due to lack of event/parameter validation label Jan 14, 2021
@MadLittleMods MadLittleMods added the A-Federated-Join joins over federation generally suck label May 10, 2022
@DMRobertson
Copy link
Contributor

  • m.room.member event of joining user has depth of 1.

  • all auth_events have a depth of 0.

depth is a hint at best; it's not to be relied upon. Note that state res v2 is no longer involves depth.

@DMRobertson DMRobertson added the T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. label May 10, 2022
@DMRobertson DMRobertson added A-Spec-Compliance places where synapse does not conform to the spec S-Minor Blocks non-critical functionality, workarounds exist. O-Uncommon Most users are unlikely to come across this or unexpected workflow Z-Cleanup Things we want to get rid of, but aren't actively causing pain labels Sep 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Federated-Join joins over federation generally suck A-Spec-Compliance places where synapse does not conform to the spec A-Validation 500 (mostly) errors due to lack of event/parameter validation O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. Z-Cleanup Things we want to get rid of, but aren't actively causing pain
Projects
None yet
Development

No branches or pull requests

4 participants