diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-05-17 09:59:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 09:59:17 -0400 |
commit | 206a7b5f12fd3d88ec24a1f53ce75e5b701faed8 (patch) | |
tree | 3467bc53ff1c6b63b70224d9686080d3be88756e | |
parent | Clarify comments in the space summary handler. (#9974) (diff) | |
download | synapse-206a7b5f12fd3d88ec24a1f53ce75e5b701faed8.tar.xz |
Fix the allowed range of valid ordering characters for spaces. (#10002)
\x7F was meant to be \0x7E (~) this was originally incorrect in MSC1772.
-rw-r--r-- | changelog.d/10002.bugfix | 1 | ||||
-rw-r--r-- | synapse/handlers/space_summary.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/10002.bugfix b/changelog.d/10002.bugfix new file mode 100644 index 0000000000..1fabdad22e --- /dev/null +++ b/changelog.d/10002.bugfix @@ -0,0 +1 @@ +Fix a validation bug introduced in v1.34.0 in the ordering of spaces in the space summary API. diff --git a/synapse/handlers/space_summary.py b/synapse/handlers/space_summary.py index 953356f34d..eb80a5ad67 100644 --- a/synapse/handlers/space_summary.py +++ b/synapse/handlers/space_summary.py @@ -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]: |