diff options
author | Erik Johnston <erik@matrix.org> | 2016-04-05 12:56:29 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-04-05 12:56:29 +0100 |
commit | 6222ae51cee230fc746d0706db13d8928f28234b (patch) | |
tree | af1fe5d75f1bb98379bc3193b1c43eecae018d22 /synapse | |
parent | Line length (diff) | |
download | synapse-6222ae51cee230fc746d0706db13d8928f28234b.tar.xz |
Don't backfill from self
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/federation.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 267fedf114..edffa560bf 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -289,6 +289,9 @@ class FederationHandler(BaseHandler): def backfill(self, dest, room_id, limit, extremities=[]): """ Trigger a backfill request to `dest` for the given `room_id` """ + if dest == self.server_name: + raise SynapseError(400, "Can't backfill from self.") + if not extremities: extremities = yield self.store.get_oldest_events_in_room(room_id) @@ -455,7 +458,7 @@ class FederationHandler(BaseHandler): likely_domains = [ domain for domain, depth in curr_domains - if domain is not self.server_name + if domain != self.server_name ] @defer.inlineCallbacks |