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

Commit

Permalink
Fix the allowed range of valid ordering characters for spaces. (#10002)
Browse files Browse the repository at this point in the history
\x7F was meant to be \0x7E (~) this was originally incorrect
in MSC1772.
  • Loading branch information
clokep authored May 17, 2021
1 parent 9752849 commit 206a7b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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 @@ -471,8 +471,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

0 comments on commit 206a7b5

Please sign in to comment.