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.
Sending array instead of object for "ignored_users" breaks synapse for one user #8357
Copy link
Copy link
Closed
Labels
A-Validation500 (mostly) errors due to lack of event/parameter validation500 (mostly) errors due to lack of event/parameter validationz-bug(Deprecated Label)(Deprecated Label)z-p2(Deprecated Label)(Deprecated Label)
Description
Description
I have played around with FluffyChat to implement ignored user lists and have sent a wrong account data event to Synapse. This makes Synapse unusable for my user.
The broken event:
{
"content": {
"ignored_users": [
"@test:janian.de"
]
},
"type": "m.ignored_user_list"
}
I have just missunderstood the spec and have sent an array and not an object as "ignored_users".
Logs:
2020-09-20 07:53:32,780 - synapse.http.server - 80 - ERROR - GET-8896 - Failed handle request via 'SyncRestServlet': <XForwardedForRequest at 0xffff882be940 method='GET' uri='/_matrix/client/r0/sync?fil>
Traceback (most recent call last):
File "/home/ubuntu/synapse/env/lib/python3.8/site-packages/synapse/http/server.py", line 229, in _async_render_wrapper
callback_return = await self._async_render(request)
File "/home/ubuntu/synapse/env/lib/python3.8/site-packages/synapse/http/server.py", line 406, in _async_render
callback_return = await raw_callback_return
File "/home/ubuntu/synapse/env/lib/python3.8/site-packages/synapse/rest/client/v2_alpha/sync.py", line 174, in on_GET
sync_result = await self.sync_handler.wait_for_sync_for_user(
File "/home/ubuntu/synapse/env/lib/python3.8/site-packages/synapse/handlers/sync.py", line 278, in wait_for_sync_for_user
res = await self.response_cache.wrap(
File "/home/ubuntu/synapse/env/lib/python3.8/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/home/ubuntu/synapse/env/lib/python3.8/site-packages/synapse/handlers/sync.py", line 310, in _wait_for_sync_for_user
result = await self.current_sync_for_user(
File "/home/ubuntu/synapse/env/lib/python3.8/site-packages/synapse/handlers/sync.py", line 342, in current_sync_for_user
return await self.generate_sync_result(sync_config, since_token, full_state)
File "/home/ubuntu/synapse/env/lib/python3.8/site-packages/synapse/handlers/sync.py", line 998, in generate_sync_result
res = await self._generate_sync_entry_for_rooms(
File "/home/ubuntu/synapse/env/lib/python3.8/site-packages/synapse/handlers/sync.py", line 1395, in _generate_sync_entry_for_rooms
ignored_users = ignored_account_data.get("ignored_users", {}).keys()
AttributeError: 'list' object has no attribute 'keys'
Version information
- Homeserver: janian.de
-
Version:
{
"python_version": "3.8.2",
"server_version": "1.19.3"
} -
Install method:
pip -
Platform:
Ubuntu 20.04 on Raspberry Pi 4B
Metadata
Metadata
Assignees
Labels
A-Validation500 (mostly) errors due to lack of event/parameter validation500 (mostly) errors due to lack of event/parameter validationz-bug(Deprecated Label)(Deprecated Label)z-p2(Deprecated Label)(Deprecated Label)