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

Fix the allowed range of valid ordering characters for spaces. #10002

Merged
merged 3 commits into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/10002.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a validation bug introduced in v1.34.0 in the ordering of spaces in the space summary API.
4 changes: 2 additions & 2 deletions synapse/handlers/space_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ def _is_suggested_child_event(edge_event: EventBase) -> bool:
return False


# Order may only contain characters in the range of \x20 (space) to \x7F (~).
_INVALID_ORDER_CHARS_RE = re.compile(r"[^\x20-\x7F]")
# Order may only contain characters in the range of \x20 (space) to \x7E (~) inclusive.
_INVALID_ORDER_CHARS_RE = re.compile(r"[^\x20-\x7E]")


def _child_events_comparison_key(child: EventBase) -> Tuple[bool, Optional[str], str]:
Expand Down