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

ValueError: Stop argument for islice() must be None or an integer: 0 <= x <= sys.maxsize. #10610

@clokep

Description

@clokep

See https://sentry.matrix.org/sentry/synapse-matrixorg/issues/222815/?query=is%3Aunresolved

Happening at synapse.handlers.space_summary in _summarize_local_room. Seems to be due to max_rooms_per_space being passed a -1 via federation. The stack is:

ValueError: Stop argument for islice() must be None or an integer: 0 <= x <= sys.maxsize.
  File "synapse/http/server.py", line 258, in _async_render_wrapper
    callback_return = await self._async_render(request)
  File "synapse/http/server.py", line 446, in _async_render
    callback_return = await raw_callback_return
  File "synapse/federation/transport/server.py", line 369, in new_func
    origin, content, request.args, *args, **kwargs
  File "synapse/federation/transport/server.py", line 1944, in on_POST
    origin, room_id, suggested_only, max_rooms_per_space, exclude_rooms
  File "synapse/handlers/space_summary.py", line 289, in federation_space_summary
    None, origin, room_id, suggested_only, max_rooms_per_space
  File "synapse/handlers/space_summary.py", line 357, in _summarize_local_room
    for edge_event in itertools.islice(child_events, max_children):

Metadata

Metadata

Assignees

Labels

A-SpacesHierarchical organization of roomsT-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions