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

Extra fields in space hierarchy listing response #12169

Closed
jplatte opened this issue Mar 5, 2022 · 6 comments · Fixed by #12175
Closed

Extra fields in space hierarchy listing response #12169

jplatte opened this issue Mar 5, 2022 · 6 comments · Fixed by #12175
Assignees
Labels
A-Spec-Compliance places where synapse does not conform to the spec S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@jplatte
Copy link
Contributor

jplatte commented Mar 5, 2022

Description

Synapse includes at least two fields in the GET …/hierarchy space listing response that it probably shouldn't:

  • join_rules which seems to be duplicating join_rule
  • allowed_room_ids, for restricted rooms

I originally reported this in the spec since I assumed allowed_room_ids was actually meant to be received by clients: matrix-org/matrix-spec#984 (comment)

Steps to reproduce

  • Open Element dev Console (Ctrl+Shift+I), Network tab
  • List rooms of a space with restricted rooms
  • Observe a GET …/hierarchy request and its response

Version information

  • Homeserver: flipdot.org

If not matrix.org:

  • Version: 1.53.0
  • Install method: 🤷🏼
  • Platform: 🤷🏼
@reivilibre
Copy link
Contributor

reivilibre commented Mar 7, 2022

Noting that this seems to be about the Client-Server /hierarchy API (though maybe it's also worth checking the Server-Server one).

@clokep
Copy link
Member

clokep commented Mar 7, 2022

though maybe it's also worth checking the Server-Server one

These fields are used by the Server-Server API to pass additional information. They should not be passed down via the Client-Server API.

@clokep
Copy link
Member

clokep commented Mar 7, 2022

I'm unable to reproduce this -- can you provide (privately, if needed) an example API call / response?

@clokep clokep added the X-Needs-Info This issue is blocked awaiting information from the reporter label Mar 7, 2022
@clokep
Copy link
Member

clokep commented Mar 7, 2022

We debugged this a little bit and it seems to only happen for restricted rooms that the user is not in.

@clokep clokep self-assigned this Mar 7, 2022
@clokep clokep added A-Spec-Compliance places where synapse does not conform to the spec S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. and removed X-Needs-Info This issue is blocked awaiting information from the reporter labels Mar 7, 2022
@clokep
Copy link
Member

clokep commented Mar 7, 2022

I was able to reproduce this in a unit test, it seemed we did the proper thing for the /spaces API (which was now removed in #12073), but the /hierarchy API has always returned this if the result was retrieved over federation.

@clokep
Copy link
Member

clokep commented Mar 7, 2022

Hopefully fixed by #12175, thanks for reporting!

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 S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants