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

If matrix homeserver has a IDN domain name admin can generate rooms via the app but nobody can join them #8668

Open
MattiJarvinen opened this issue Oct 19, 2023 · 0 comments
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@MattiJarvinen
Copy link

MattiJarvinen commented Oct 19, 2023

Steps to reproduce

  1. homeserver server_name is a IDN -domain name configured in ACE encoding form.
  2. As a user with admin rights creates new space and add some rooms to it
  3. Invite a person to the space
  4. Person joins the space
  5. Person sees the room suggestions
  6. Person taps join on a room
  7. Client sends join room
  8. Server logs:
    2023-10-19 21:59:01,725 - synapse.http.server - 124 - INFO - POST-978 - <XForwardedForRequest at 0x54654544454
    method='POST' uri='/_matrix/client/r0/join/!{something}:{ACE ENCODED server_name}?server_name={UN ACE-ENCODED server_name URLENCODED}' clientproto='HTTP/1.1' site='8008'> SynapseError: 400 - Query parameter 'server_name' must be ascii
  9. Joining the room fails

If the domain would have been matrix.pöö.info ( an internationalized domain name ) and server_name in synapse config matrix.xn--ndaa.info ( IDN ASCII safe ACE-encoded form )
In the Room join API call server_name parameter should have been matrix.xn--ndaa.info ( server_name config as is )
Instead server_name parameter was matrix.p%C3%B6%C3%B6.info ( urlencode(matrix.pöö.info) )

Outcome

What did you expect?

Android Client doesn't mess the server_name and would use the server_name as is in the join room API call.
Joining the room succeeds.

What happened instead?

Prior to calling room API server_name is un ACE encoded into non ASCII character string.
Non ASCII string is passed to the API call
API URL-encodes the non ASCII string
Server logs the error
Joining the room fails.

Your phone model

No response

Operating system version

No response

Application version and app store

Element 1.6.6 [40106062] (G-4fa634a2)

Homeserver

Synapse 1.94.0

Will you send logs?

No

Are you willing to provide a PR?

No

@MattiJarvinen MattiJarvinen added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Oct 19, 2023
@kittykat kittykat added S-Critical Prevents work, causes data loss and/or has no workaround O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

No branches or pull requests

2 participants