This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
/createRoom
: "ValueError: invalid hostname:" when sending empty/invalid 3pid invite #13511
Copy link
Copy link
Open
Labels
A-Create-RoomA-Validation500 (mostly) errors due to lack of event/parameter validation500 (mostly) errors due to lack of event/parameter validationO-UncommonMost users are unlikely to come across this or unexpected workflowMost users are unlikely to come across this or unexpected workflowS-TolerableMinor significance, cosmetic issues, low or no impact to users.Minor significance, cosmetic issues, low or no impact to users.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Description
Description
When sending:
{"name":"a","invite_3pid":[{"address":"","id_access_token":"","id_server":"","medium":""}]}
to /_matrix/client/v3/createRoom
the server returns an internal server (see log below)
Steps to reproduce
- Create a room and set the 3pid invite to an address of an empty string. You get:
{
"errcode": "M_UNKNOWN",
"error": "Internal server error"
}
Homeserver
localhost
Synapse Version
{"server_version":"1.64.0","python_version":"3.9.13"}
Installation Method
Docker (matrixdotorg/synapse)
Platform
Kubernetes with postgres and the official docker image
Relevant log output
2022-08-11 22:26:00,473 - synapse.http.client - 455 - INFO - POST-4392- Error sending request to GET https:///_matrix/identity/v2/hash_details?access_token=<redacted>: ValueError invalid hostname:
2022-08-11 22:26:00,475 - synapse.handlers.identity - 632 - WARNING - POST-4392- Error when looking up hashing details: invalid hostname:
2022-08-11 22:26:00,481 - synapse.http.client - 455 - INFO - POST-4392- Error sending request to POST https:///_matrix/identity/api/v1/store-invite: ValueError invalid hostname:
2022-08-11 22:26:00,481 - synapse.http.server - 183 - ERROR - POST-4392- Failed handle request via 'RoomCreateRestServlet': <XForwardedForRequest at 0x7f28b048aa30 method='POST' uri='/_matrix/client/v3/createRoom' clientproto='HTTP/1.1' site='8008'>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/synapse/http/server.py", line 366, in _async_render_wrapper
callback_return = await self._async_render(request)
File "/usr/local/lib/python3.9/site-packages/synapse/http/server.py", line 572, in _async_render
callback_return = await raw_callback_return
File "/usr/local/lib/python3.9/site-packages/synapse/rest/client/room.py", line 91, in on_POST
info, _ = await self._room_creation_handler.create_room(
File "/usr/local/lib/python3.9/site-packages/synapse/handlers/room.py", line 990, in create_room
) = await self.hs.get_room_member_handler().do_3pid_invite(
File "/usr/local/lib/python3.9/site-packages/synapse/handlers/room_member.py", line 1469, in do_3pid_invite
event, stream_id = await self._make_and_store_3pid_invite(
File "/usr/local/lib/python3.9/site-packages/synapse/handlers/room_member.py", line 1553, in _make_and_store_3pid_invite
) = await self.identity_handler.ask_id_server_for_third_party_invite(
File "/usr/local/lib/python3.9/site-packages/synapse/handlers/identity.py", line 882, in ask_id_server_for_third_party_invite
data = await self.blacklisting_http_client.post_json_get_json(
File "/usr/local/lib/python3.9/site-packages/synapse/http/client.py", line 551, in post_json_get_json
response = await self.request(
File "/usr/local/lib/python3.9/site-packages/synapse/http/client.py", line 443, in request
response = await make_deferred_yieldable(request_deferred)
ValueError: invalid hostname:
Anything else that would be useful to know?
No response
Metadata
Metadata
Assignees
Labels
A-Create-RoomA-Validation500 (mostly) errors due to lack of event/parameter validation500 (mostly) errors due to lack of event/parameter validationO-UncommonMost users are unlikely to come across this or unexpected workflowMost users are unlikely to come across this or unexpected workflowS-TolerableMinor significance, cosmetic issues, low or no impact to users.Minor significance, cosmetic issues, low or no impact to users.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.