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

Invite by email fails, when synapse option: "email.invite_client_location" is set (with any value) #540

Closed
coolsantino opened this issue Dec 21, 2022 · 8 comments · Fixed by #545
Assignees

Comments

@coolsantino
Copy link

coolsantino commented Dec 21, 2022

Synapse v1.74.0

Synapse server flow:

2022-12-21 15:22:17,000 - synapse.http.client - 460 - INFO - POST-105 - Received response to GET https://vector.im/_matrix/identity/v2/hash_details?access_token=<redacted>: 200
2022-12-21 15:22:17,471 - synapse.http.client - 460 - INFO - POST-105 - Received response to POST https://vector.im/_matrix/identity/v2/lookup: 200
2022-12-21 15:22:17,600 - synapse.http.client - 460 - INFO - POST-105 - Received response to POST https://vector.im/_matrix/identity/v2/store-invite: 403
2022-12-21 15:22:17,601 - synapse.http.server - 124 - ERROR - POST-105 - Failed handle request via 'RoomMembershipRestServlet': <XForwardedForRequest at 0x7fb54be3f4c0 method='POST' uri='

Sydent logs

Dec 21 12:22:17 corus sydent-vectoris[469]: 2022-12-21 12:22:17,532 - sydent.http.servlets.store_invite_servlet - 81 - INFO - Store invite request from @alexandro:foilhat.tk to ...
Dec 21 12:22:17 corus sydent-vectoris[469]: 2022-12-21 12:22:17,558 - sydent.http.servlets.store_invite_servlet - 142 - INFO - Denying invites as 'https://' appears in arg 'org.matrix.web_client_location': 'https://element.foilhat.tk'
Dec 21 12:22:17 corus sydent-vectoris[469]: 2022-12-21 12:22:17,559 - twisted - 147 - INFO - "::ffff:10.101.0.14" - - [21/Dec/2022:12:22:16 +0000] "POST /_matrix/identity/v2/store-invite HTTP/1.1" 403 60 "-" "Synapse/1.74.0"
@richvdh
Copy link
Member

richvdh commented Dec 21, 2022

Related: matrix-org/matrix-spec#1360

@Sazu-bit
Copy link

Sazu-bit commented Dec 21, 2022

We're also seeing this.

2022-12-21 18:04:44,181 - synapse.http.server - 124 - ERROR - POST-1000896 - Failed handle request via 'RoomMembershipRestServlet': <XForwardedForRequest at 0x7f6949d312e0 method='POST' uri='/_matrix/client/r0/rooms/<--Snip-->/invite' clientproto='HTTP/1.0' site='8008'>

Traceback (most recent call last):
  
File "/root/synapse/env/lib/python3.8/site-packages/synapse/http/server.py", line 307, in _async_render_wrapper
    callback_return = await self._async_render(request)
  
File "/root/synapse/env/lib/python3.8/site-packages/synapse/http/server.py", line 513, in _async_render
    callback_return = await raw_callback_return
  
File "/root/synapse/env/lib/python3.8/site-packages/synapse/rest/client/room.py", line 973, in on_POST
    await self.room_member_handler.do_3pid_invite(
  
File "/root/synapse/env/lib/python3.8/site-packages/synapse/handlers/room_member.py", line 1487, in do_3pid_invite
    event, stream_id = await self._make_and_store_3pid_invite(
  
File "/root/synapse/env/lib/python3.8/site-packages/synapse/handlers/room_member.py", line 1571, in _make_and_store_3pid_invite
    ) = await self.identity_handler.ask_id_server_for_third_party_invite(
  
File "/root/synapse/env/lib/python3.8/site-packages/synapse/handlers/identity.py", line 756, in ask_id_server_for_third_party_invite
    data = await self.blacklisting_http_client.post_json_get_json(
  
File "/root/synapse/env/lib/python3.8/site-packages/synapse/http/client.py", line 574, in post_json_get_json
    
raise HttpResponseException(
synapse.api.errors.HttpResponseException: 403: Forbidden

Same symptoms invite by email fails.

@jsigwart
Copy link

I am dealing with this issue as well and am hoping for a fix.

@Sazu-bit
Copy link

Sazu-bit commented Dec 22, 2022

Attempted to change the https:// for a http:// but same errors being thrown by Synapse. Suspect the same is also thrown by Sydent.

@GreenFootballs
Copy link

Having the same issue. Inviting by email fails with an "unknown error."

@H-Shay
Copy link
Contributor

H-Shay commented Jan 10, 2023

This is hopefully fixed by #545, which should be deployed soon.

@erikjohnston
Copy link
Member

This is deployed now. Hopefully should work now?

@coolsantino
Copy link
Author

All fine now. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants