Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
cbe01ccc
Unverified
Commit
cbe01ccc
authored
2 years ago
by
David Robertson
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Reject history insertion during partial joins (#14291)
parent
40fa8294
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/14291.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/14291.bugfix
synapse/rest/client/room_batch.py
+7
-0
7 additions, 0 deletions
synapse/rest/client/room_batch.py
with
8 additions
and
0 deletions
changelog.d/14291.bugfix
0 → 100644
+
1
−
0
View file @
cbe01ccc
Prevent history insertion ([MSC2716](https://github.com/matrix-org/matrix-spec-proposals/pull/2716)) during an partial join ([MSC3706](https://github.com/matrix-org/matrix-spec-proposals/pull/3706)).
This diff is collapsed.
Click to expand it.
synapse/rest/client/room_batch.py
+
7
−
0
View file @
cbe01ccc
...
...
@@ -108,6 +108,13 @@ class RoomBatchSendEventRestServlet(RestServlet):
errcode
=
Codes
.
MISSING_PARAM
,
)
if
await
self
.
store
.
is_partial_state_room
(
room_id
):
raise
SynapseError
(
HTTPStatus
.
BAD_REQUEST
,
"
Cannot insert history batches until we have fully joined the room
"
,
errcode
=
Codes
.
UNABLE_DUE_TO_PARTIAL_STATE
,
)
# Verify the batch_id_from_query corresponds to an actual insertion event
# and have the batch connected.
if
batch_id_from_query
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment