Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Replace returnValue with return (#5736) | Amber Brown | 2019-07-23 | 1 | -42/+40 |
| | |||||
* | Move logging utilities out of the side drawer of util/ and into logging/ (#5606) | Amber Brown | 2019-07-04 | 1 | -21/+22 |
| | |||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -521/+363 |
| | |||||
* | Merge pull request #5042 from matrix-org/erikj/fix_get_missing_events_error | Erik Johnston | 2019-06-19 | 1 | -9/+19 |
|\ | | | | | Handle the case of `get_missing_events` failing | ||||
| * | Fix logline | Erik Johnston | 2019-06-18 | 1 | -1/+1 |
| | | |||||
| * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2019-06-18 | 1 | -132/+289 |
| |\ | | | | | | | | | | erikj/fix_get_missing_events_error | ||||
| * | | Handle the case of `get_missing_events` failing | Erik Johnston | 2019-04-10 | 1 | -9/+20 |
| | | | | | | | | | | | | | | | | | | | | | Currently if a call to `/get_missing_events` fails we log an exception and stop processing the top level event we received over federation. Instead let's try and handle it sensibly given it is a somewhat expected failure mode. | ||||
* | | | Add some logging to 3pid invite sig verification (#5015) | David Baker | 2019-06-18 | 1 | -8/+38 |
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | I had to add quite a lot of logging to diagnose a problem with 3pid invites - we only logged the one failure which isn't all that informative. NB. I'm not convinced the logic of this loop is right: I think it should just accept a single valid signature from a trusted source rather than fail if *any* signature is invalid. Also it should probably not skip the rest of middle loop if a check fails? However, I'm deliberately not changing the logic here. | ||||
* | | Merge pull request #5464 from matrix-org/erikj/3pid_remote_invite_state | Erik Johnston | 2019-06-17 | 1 | -6/+0 |
|\ \ | | | | | | | Fix 3PID invite room state over federation. | ||||
| * | | Fix 3PID invite room state over federation. | Erik Johnston | 2019-06-14 | 1 | -6/+0 |
| | | | | | | | | | | | | | | | | | | | | | Fixes that when a user exchanges a 3PID invite for a proper invite over federation it does not include the `invite_room_state` key. This was due to synapse incorrectly sending out two invite requests. | ||||
* | | | Add plugin APIs for implementations of custom event rules. | Brendan Abolivier | 2019-06-14 | 1 | -2/+66 |
|/ / | |||||
* | | Add logging when request fails and clarify we ignore errors. | Erik Johnston | 2019-06-05 | 1 | -4/+12 |
| | | |||||
* | | Fix handling of failures when calling /event_auth. | Erik Johnston | 2019-06-03 | 1 | -12/+38 |
| | | | | | | | | | | | | | | | | | | | | When processing an incoming event over federation, we may try and resolve any unexpected differences in auth events. This is a non-essential process and so should not stop the processing of the event if it fails (e.g. due to the remote disappearing or not implementing the necessary endpoints). Fixes #3330 | ||||
* | | Simplifications and comments in do_auth (#5227) | Richard van der Hoff | 2019-05-23 | 1 | -120/+181 |
| | | | | | | | | | | I was staring at this function trying to figure out wtf it was actually doing. This is (hopefully) a non-functional refactor which makes it a bit clearer. | ||||
* | | Exclude soft-failed events from fwd-extremity candidates. (#5146) | Richard van der Hoff | 2019-05-21 | 1 | -1/+6 |
|/ | | | | | | | | When considering the candidates to be forward-extremities, we must exclude soft failures. Hopefully fixes #5090. | ||||
* | Collect room-version variations into one place (#4969) | Richard van der Hoff | 2019-04-01 | 1 | -8/+5 |
| | | | | Collect all the things that make room-versions different to one another into one place, so that it's easier to define new room versions. | ||||
* | Factor out soft fail checks | Erik Johnston | 2019-03-08 | 1 | -5/+22 |
| | |||||
* | Implement soft fail | Erik Johnston | 2019-03-06 | 1 | -1/+76 |
| | |||||
* | clarify comments | Erik Johnston | 2019-03-05 | 1 | -8/+11 |
| | |||||
* | Only check history visibility when filtering | Erik Johnston | 2019-03-04 | 1 | -1/+3 |
| | | | | | | When filtering events to send to server we check more than just history visibility. However when deciding whether to backfill or not we only care about the history visibility. | ||||
* | s/get_forward_events/get_successor_events/ | Erik Johnston | 2019-03-04 | 1 | -1/+1 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2019-03-04 | 1 | -3/+31 |
|\ | | | | | | | erikj/stop_fed_not_in_room | ||||
| * | Fix typo | Erik Johnston | 2019-02-25 | 1 | -1/+1 |
| | | |||||
| * | More comments | Erik Johnston | 2019-02-25 | 1 | -0/+4 |
| | | |||||
| * | Assert rather than clobber the values | Erik Johnston | 2019-02-25 | 1 | -2/+2 |
| | | |||||
| * | Add comments and paranoia | Erik Johnston | 2019-02-25 | 1 | -2/+23 |
| | | |||||
| * | Fix backfill storing incorrect state for events | Erik Johnston | 2019-02-22 | 1 | -1/+4 |
| | | |||||
* | | Update comments | Erik Johnston | 2019-02-27 | 1 | -3/+13 |
| | | |||||
* | | Stop backpaginating when events not visible | Erik Johnston | 2019-02-20 | 1 | -0/+31 |
|/ | |||||
* | Fix flake8 (#4519) | Amber Brown | 2019-01-30 | 1 | -1/+1 |
| | |||||
* | Use snder and not event ID domain to check if ours | Erik Johnston | 2019-01-29 | 1 | -0/+8 |
| | | | | | | The transaction queue only sends out events that we generate. This was done by checking domain of event ID, but that can no longer be used. Instead, we may as well use the sender field. | ||||
* | Fixup calls to `comput_event_signature` | Erik Johnston | 2019-01-29 | 1 | -1/+1 |
| | | | | | | | | We currently pass FrozenEvent instead of `dict` to `compute_event_signature`, which works by accident due to `dict(event)` producing the correct result. This fixes PR #4493 commit 855a151 | ||||
* | Merge pull request #4494 from matrix-org/erikj/fixup_event_validator | Erik Johnston | 2019-01-29 | 1 | -2/+5 |
|\ | | | | | Split up event validation between event and builder | ||||
| * | Split up event validation between event and builder | Erik Johnston | 2019-01-28 | 1 | -2/+5 |
| | | | | | | | | | | | | | | | | | | The validator was being run on the EventBuilder objects, and so the validator only checked a subset of fields. With the upcoming EventBuilder refactor even fewer fields will be there to validate. To get around this we split the validation into those that can be run against an EventBuilder and those run against a fully fledged event. | ||||
* | | Pass through room version to event auth | Erik Johnston | 2019-01-25 | 1 | -8/+12 |
|/ | |||||
* | Require event format version to parse or create events | Erik Johnston | 2019-01-25 | 1 | -28/+44 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/msc_1813 | Erik Johnston | 2019-01-25 | 1 | -31/+18 |
|\ | |||||
| * | Merge pull request #4448 from matrix-org/erikj/get_pdu_versions | Erik Johnston | 2019-01-24 | 1 | -2/+15 |
| |\ | | | | | | | Add room_version param to get_pdu | ||||
| | * | Review comments | Erik Johnston | 2019-01-24 | 1 | -0/+5 |
| | | | |||||
| | * | Add room_version param to get_pdu | Erik Johnston | 2019-01-23 | 1 | -2/+10 |
| | | | | | | | | | | | | | | | When we add new event format we'll need to know the event format or room version when parsing events. | ||||
| * | | Remove unecessary setting of outlier bit | Erik Johnston | 2019-01-24 | 1 | -2/+0 |
| | | | |||||
| * | | Use term 'out of band membership' instead | Erik Johnston | 2019-01-24 | 1 | -2/+2 |
| | | | |||||
| * | | Clarify the invite flows | Erik Johnston | 2019-01-23 | 1 | -1/+11 |
| | | | |||||
| * | | Remove unnecessary '_sign_event' | Erik Johnston | 2019-01-23 | 1 | -14/+0 |
| | | | |||||
| * | | Store rejected remote invite events as outliers | Erik Johnston | 2019-01-23 | 1 | -32/+12 |
| |/ | | | | | | | | | | | | | | | | | | | | | Currently they're stored as non-outliers even though the server isn't in the room, which can be problematic in places where the code assumes it has the state for all non outlier events. In particular, there is an edge case where persisting the leave event triggers a state resolution, which requires looking up the room version from state. Since the server doesn't have the state, this causes an exception to be thrown. | ||||
* / | Implement MSC 1813 - Add room version to make APIs | Erik Johnston | 2019-01-23 | 1 | -1/+1 |
|/ | | | | | We also implement `make_membership_event` converting the returned room version to an event format version. | ||||
* | Remove hack to support rejoining rooms | Erik Johnston | 2018-11-09 | 1 | -74/+42 |
| | |||||
* | Simplify to always drop events if server isn't in the room | Erik Johnston | 2018-11-09 | 1 | -14/+9 |
| | |||||
* | Add helpers for getting prev and auth events (#4139) | Erik Johnston | 2018-11-06 | 1 | -24/+24 |
| | | | | | | | * Add helpers for getting prev and auth events This is in preparation for allowing the event format to change between room versions. | ||||
* | Merge pull request #4040 from matrix-org/erikj/states_res_v2_rebase | Erik Johnston | 2018-10-24 | 1 | -15/+15 |
|\ | | | | | Add v2 state resolution algorithm | ||||
| * | Comment | Erik Johnston | 2018-10-24 | 1 | -2/+5 |
| | | |||||
| * | Rename resolve_events_with_factory | Erik Johnston | 2018-10-24 | 1 | -2/+2 |
| | | |||||
| * | Fix up use of resolve_events_with_factory | Erik Johnston | 2018-10-16 | 1 | -13/+10 |
| | | |||||
* | | Remove redundant run_as_background_process() from pusherpool | Richard van der Hoff | 2018-10-22 | 1 | -2/+2 |
| | | | | | | | | | | | | | | `on_new_notifications` and `on_new_receipts` in `HttpPusher` and `EmailPusher` now always return synchronously, so we can remove the `defer.gatherResults` on their results, and the `run_as_background_process` wrappers can be removed too because the PusherPool methods will now complete quickly enough. | ||||
* | | Fix incorrect truncation in get_missing_events | Richard van der Hoff | 2018-10-16 | 1 | -7/+5 |
|/ | | | | | | | | | It's quite important that get_missing_events returns the *latest* events in the room; however we were pulling event ids out of the database until we got *at least* 10, and then taking the *earliest* of the results. We also shouldn't really be relying on depth, and should be checking the room_id. | ||||
* | Avoid reraise, to improve stacktraces | Richard van der Hoff | 2018-10-01 | 1 | -10/+10 |
| | |||||
* | Include event when resolving state for missing prevs | Richard van der Hoff | 2018-09-27 | 1 | -2/+16 |
| | | | | | | | | | | | If we have a forward extremity for a room as `E`, and you receive `A`, `B`, s.t. `A -> B -> E`, and `B` also points to an unknown event `X`, then we need to do state res between `X` and `E`. When that happens, we need to make sure we include `X` in the state that goes into the state res alg. Fixes #3934. | ||||
* | Include state from remote servers in pdu handling | Richard van der Hoff | 2018-09-27 | 1 | -4/+19 |
| | | | | | | | | If we've fetched state events from remote servers in order to resolve the state for a new event, we need to actually pass those events into resolve_events_with_factory (so that it can do the state res) and then persist the ones we need - otherwise other bits of the codebase get confused about why we have state groups pointing to non-existent events. | ||||
* | Fix "unhashable type: 'list'" exception in federation handling | Richard van der Hoff | 2018-09-27 | 1 | -7/+12 |
| | | | | | | | | | | | | | get_state_groups returns a map from state_group_id to a list of FrozenEvents, so was very much the wrong thing to be putting as one of the entries in the list passed to resolve_events_with_factory (which expects maps from (event_type, state_key) to event id). We actually want get_state_groups_ids().values() rather than get_state_groups(). This fixes the main problem in #3923, but there are other problems with this bit of code which get discovered once you do so. | ||||
* | more comments | Richard van der Hoff | 2018-09-27 | 1 | -4/+3 |
| | |||||
* | Clarifications in FederationHandler | Richard van der Hoff | 2018-09-27 | 1 | -2/+11 |
| | | | | | | | * add some comments on things that look a bit bogus * rename this `state` variable to avoid confusion with the `state` used elsewhere in this function. (There was no actual conflict, but it was a confusing bit of spaghetti.) | ||||
* | Merge pull request #3966 from matrix-org/rav/rx_txn_logging_2 | Richard van der Hoff | 2018-09-27 | 1 | -0/+4 |
|\ | | | | | Logging improvements | ||||
| * | Logging improvements | Richard van der Hoff | 2018-09-26 | 1 | -0/+4 |
| | | | | | | | | Some logging tweaks to help with debugging incoming federation transactions | ||||
* | | Include eventid in log lines when processing incoming federation ↵ | Richard van der Hoff | 2018-09-27 | 1 | -26/+39 |
|/ | | | | | | | | | | | transactions (#3959) when processing incoming transactions, it can be hard to see what's going on, because we process a bunch of stuff in parallel, and because we may end up recursively working our way through a chain of three or four events. This commit creates a way to use logcontexts to add the relevant event ids to the log lines. | ||||
* | Comments and interface cleanup for on_receive_pdu | Richard van der Hoff | 2018-09-20 | 1 | -23/+46 |
| | | | | | | | | Add some informative comments about what's going on here. Also, `sent_to_us_directly` and `get_missing` were doing the same thing (apart from in `_handle_queued_pdus`, which looks like a bug), so let's get rid of `get_missing` and use `sent_to_us_directly` consistently. | ||||
* | Improve the logging when handling a federation transaction (#3904) | Richard van der Hoff | 2018-09-19 | 1 | -55/+109 |
| | | | | | | | | | | Let's try to rationalise the logging that happens when we are processing an incoming transaction, to make it easier to figure out what is going wrong when they take ages. In particular: - make everything start with a [room_id event_id] prefix - make sure we log a warning when catching exceptions rather than just turning them into other, more cryptic, exceptions. | ||||
* | Bump timeout on get_missing_events request | Richard van der Hoff | 2018-09-18 | 1 | -1/+30 |
| | |||||
* | Port handlers/ to Python 3 (#3803) | Amber Brown | 2018-09-07 | 1 | -3/+3 |
| | |||||
* | Remove unnecessary resolve_events_with_state_map | Erik Johnston | 2018-08-22 | 1 | -1/+1 |
| | | | | | We only ever used the synchronous resolve_events_with_state_map in one place, which is trivial to replace with the async version. | ||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2018-08-20 | 1 | -20/+59 |
|\ | | | | | | | erikj/refactor_state_handler | ||||
| * | Fix logcontexts for running pushers | Richard van der Hoff | 2018-08-17 | 1 | -2/+1 |
| | | | | | | | | | | | | | | First of all, avoid resetting the logcontext before running the pushers, to fix the "Starting db txn 'get_all_updated_receipts' from sentinel context" warning. Instead, give them their own "background process" logcontexts. | ||||
| * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2018-08-15 | 1 | -1/+1 |
| |\ | | | | | | | | | | erikj/split_federation | ||||
| | * | Rename async to async_helpers because `async` is a keyword on Python 3.7 (#3678) | Amber Brown | 2018-08-10 | 1 | -1/+1 |
| | | | |||||
| * | | Use federation handler function rather than duplicate | Erik Johnston | 2018-08-15 | 1 | -7/+7 |
| | | | | | | | | | | | | This involves renaming _persist_events to be a public function. | ||||
| * | | Move clean_room_for_join to master | Erik Johnston | 2018-08-09 | 1 | -2/+14 |
| | | | |||||
| * | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2018-08-09 | 1 | -2/+11 |
| |\| | | | | | | | | | | erikj/split_federation | ||||
| * | | Add EDU/query handling over replication | Erik Johnston | 2018-08-06 | 1 | -11/+13 |
| | | | |||||
| * | | Add replication APIs for persisting federation events | Erik Johnston | 2018-08-06 | 1 | -9/+35 |
| | | | |||||
* | | | Remove redundant room_version checks | Erik Johnston | 2018-08-20 | 1 | -1/+1 |
| | | | |||||
* | | | Choose state algorithm based on room version | Erik Johnston | 2018-08-09 | 1 | -2/+6 |
| |/ |/| | |||||
* | | include known room versions in outgoing make_joins | Richard van der Hoff | 2018-08-06 | 1 | -2/+11 |
|/ | |||||
* | Merge branch 'master' into develop | Richard van der Hoff | 2018-08-02 | 1 | -6/+23 |
|\ | |||||
| * | Avoid extra db lookups | Richard van der Hoff | 2018-08-02 | 1 | -27/+11 |
| | | | | | | | | | | Since we're about to look up the events themselves anyway, we can skip the extra db queries here. | ||||
| * | Validation for events/rooms in fed requests | Richard van der Hoff | 2018-08-02 | 1 | -1/+34 |
| | | | | | | | | | | | | | | When we get a federation request which refers to an event id, make sure that said event is in the room the caller claims it is in. (patch supplied by @turt2live) | ||||
* | | Merge pull request #3621 from matrix-org/erikj/split_fed_store | Erik Johnston | 2018-08-02 | 1 | -87/+88 |
|\ \ | | | | | | | Split out DB writes in federation handler | ||||
| * | | update docs | Erik Johnston | 2018-08-01 | 1 | -3/+5 |
| | | | |||||
| * | | _persist_auth_tree no longer returns anything | Erik Johnston | 2018-08-01 | 1 | -1/+1 |
| | | | |||||
| * | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2018-07-30 | 1 | -1/+1 |
| |\ \ | | | | | | | | | | | | | erikj/split_fed_store | ||||
| * | | | Split out DB writes in federation handler | Erik Johnston | 2018-07-25 | 1 | -83/+82 |
| | | | | | | | | | | | | | | | | | | | | | | | | This will allow us to easily add an internal replication API to proxy these reqeusts to master, so that we can move federation APIs to workers. | ||||
* | | | | rename replication_layer to federation_client | Richard van der Hoff | 2018-07-31 | 1 | -14/+14 |
| |/ / |/| | | | | | | | | | | | I have HAD ENOUGH of trying to remember wtf a replication layer is in terms of classes. | ||||
* | | | Fix a minor documentation typo in on_make_leave | Travis Ralston | 2018-07-25 | 1 | -1/+1 |
|/ / | |||||
* | | Handle delta_ids being None in _update_context_for_auth_events | Richard van der Hoff | 2018-07-23 | 1 | -7/+6 |
| | | | | | | | | | | | | | | it's easier to create the new state group as a delta from the existing one. (There's an outside chance this will help with https://github.com/matrix-org/synapse/issues/3364) | ||||
* | | Add support for updating state | Erik Johnston | 2018-07-23 | 1 | -9/+23 |
| | | |||||
* | | Use new getters | Erik Johnston | 2018-07-23 | 1 | -7/+16 |
| | | |||||
* | | Make the rest of the .iterwhatever go away (#3562) | Amber Brown | 2018-07-21 | 1 | -9/+9 |
| | | |||||
* | | Merge pull request #3367 from matrix-org/rav/drop_re_signing_hacks | Richard van der Hoff | 2018-07-18 | 1 | -43/+0 |
|\ \ | |/ |/| | Remove event re-signing hacks | ||||
| * | Merge branch 'develop' into rav/drop_re_signing_hacks | Richard van der Hoff | 2018-07-04 | 1 | -51/+153 |
| |\ | |||||
| * | | Remove event re-signing hacks | Richard van der Hoff | 2018-06-07 | 1 | -43/+0 |
| | | | | | | | | | | | | | | | | | | These "temporary fixes" have been here three and a half years, and I can't find any events in the matrix.org database where the calculated signature differs from what's in the db. It's time for them to go away. | ||||
* | | | Move filter_events_for_server out of FederationHandler | Richard van der Hoff | 2018-07-16 | 1 | -138/+6 |
| | | | | | | | | | | | | for easier unit testing. | ||||
* | | | run isort | Amber Brown | 2018-07-09 | 1 | -18/+22 |
| |/ |/| | |||||
* | | try and clean up | Amber Brown | 2018-06-27 | 1 | -3/+6 |
| | | |||||
* | | pep8 | Amber Brown | 2018-06-27 | 1 | -6/+4 |
| | | |||||
* | | cleanups | Amber Brown | 2018-06-27 | 1 | -13/+15 |
| | | |||||
* | | handle federation not telling us about prev_events | Amber Brown | 2018-06-27 | 1 | -25/+62 |
| | | |||||
* | | Actually fix it | Erik Johnston | 2018-06-25 | 1 | -3/+3 |
| | | |||||
* | | Comment | Erik Johnston | 2018-06-25 | 1 | -0/+8 |
| | | |||||
* | | Fix bug with assuming wrong type | Erik Johnston | 2018-06-25 | 1 | -2/+2 |
| | | |||||
* | | Add fast path to _filter_events_for_server | Erik Johnston | 2018-06-25 | 1 | -1/+34 |
| | | | | | | | | | | | | Most rooms have a trivial history visibility like "shared" or "world_readable", especially large rooms, so lets not bother getting the full membership of those rooms in that case. | ||||
* | | Revert "Revert "Merge pull request #3431 from ↵ | Erik Johnston | 2018-06-25 | 1 | -0/+13 |
| | | | | | | | | | | | | matrix-org/rav/erasure_visibility"" This reverts commit 1d009013b3c3e814177afc59f066e02a202b21cd. | ||||
* | | Revert "Merge pull request #3431 from matrix-org/rav/erasure_visibility" | Richard van der Hoff | 2018-06-22 | 1 | -13/+0 |
| | | | | | | | | | | This reverts commit ce0d911156b355c5bf452120bfb08653dad96497, reversing changes made to b4a5d767a94f1680d07edfd583aae54ce422573e. | ||||
* | | Merge pull request #3431 from matrix-org/rav/erasure_visibility | Erik Johnston | 2018-06-22 | 1 | -0/+13 |
|\ \ | | | | | | | Support hiding events from deleted users | ||||
| * | | Filter out erased messages | Richard van der Hoff | 2018-06-12 | 1 | -0/+13 |
| | | | | | | | | | | | | Redact any messges sent by erased users. | ||||
* | | | Merge pull request #3428 from matrix-org/erikj/persisted_pdu | Erik Johnston | 2018-06-22 | 1 | -18/+26 |
|\| | | | | | | | | Simplify get_persisted_pdu | ||||
| * | | simplify get_persisted_pdu | Richard van der Hoff | 2018-06-12 | 1 | -18/+26 |
| | | | | | | | | | | | | | | | it doesn't make much sense to use get_persisted_pdu on the receive path: just get the event straight from the store. | ||||
* | | | Remove run_on_reactor (#3395) | Amber Brown | 2018-06-14 | 1 | -5/+1 |
|/ / | |||||
* / | Fix event filtering in get_missing_events handler | Richard van der Hoff | 2018-06-08 | 1 | -0/+4 |
|/ | |||||
* | Consistently use six's iteritems and wrap lazy keys/values in list() if ↵ | Amber Brown | 2018-05-31 | 1 | -9/+8 |
| | | | | they're not meant to be lazy (#3307) | ||||
* | Misc. py3 fixes | Adrian Tschira | 2018-05-24 | 1 | -4/+5 |
| | | | | Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | Merge pull request #3261 from matrix-org/erikj/pagination_fixes | Erik Johnston | 2018-05-24 | 1 | -9/+22 |
|\ | | | | | Fix federation backfill bugs | ||||
| * | Use iter* methods | Erik Johnston | 2018-05-22 | 1 | -7/+7 |
| | | |||||
| * | Fix that states is a dict of dicts | Erik Johnston | 2018-05-22 | 1 | -1/+4 |
| | | |||||
| * | get_domains_from_state returns list of tuples | Erik Johnston | 2018-05-22 | 1 | -2/+12 |
| | | |||||
* | | s/values/itervalues/ | Erik Johnston | 2018-05-23 | 1 | -1/+1 |
| | | |||||
* | | Use iter* methods for _filter_events_for_server | Erik Johnston | 2018-05-23 | 1 | -4/+4 |
|/ | |||||
* | Make sure we reject attempts to invite the notices user | Richard van der Hoff | 2018-05-18 | 1 | -0/+8 |
| | |||||
* | Merge pull request #3153 from NotAFile/py3-httplib | Richard van der Hoff | 2018-04-30 | 1 | -3/+3 |
|\ | | | | | move httplib import to six | ||||
| * | move httplib import to six | Adrian Tschira | 2018-04-28 | 1 | -3/+3 |
| | | |||||
* | | Merge remote-tracking branch 'origin/develop' into rav/use_run_in_background | Richard van der Hoff | 2018-04-27 | 1 | -6/+10 |
|\| | |||||
| * | reraise exceptions more carefully | Richard van der Hoff | 2018-04-27 | 1 | -6/+10 |
| | | | | | | | | | | | | | | We need to be careful (under python 2, at least) that when we reraise an exception after doing some error handling, we actually reraise the original exception rather than anything that might have been raised (and handled) during the error handling. | ||||
* | | Use run_in_background in preference to preserve_fn | Richard van der Hoff | 2018-04-27 | 1 | -6/+10 |
|/ | | | | | | While I was going through uses of preserve_fn for other PRs, I converted places which only use the wrapped function once to use run_in_background, to avoid creating the function object. | ||||
* | Merge pull request #3118 from matrix-org/rav/reject_prev_events | Richard van der Hoff | 2018-04-23 | 1 | -7/+71 |
|\ | | | | | Reject events which have lots of prev_events | ||||
| * | Remove spurious param | Richard van der Hoff | 2018-04-23 | 1 | -1/+0 |
| | | |||||
| * | accept stupid events over backfill | Richard van der Hoff | 2018-04-20 | 1 | -4/+9 |
| | | |||||
| * | Add some comments | Richard van der Hoff | 2018-04-18 | 1 | -3/+12 |
| | | |||||
| * | Check events on backfill too | Richard van der Hoff | 2018-04-18 | 1 | -15/+42 |
| | | |||||
| * | Reject events which have too many auth_events or prev_events | Richard van der Hoff | 2018-04-18 | 1 | -4/+28 |
| | | | | | | | | | | ... this should protect us from being dossed by people making silly events (deliberately or otherwise) | ||||
* | | Refactor store.have_events | Richard van der Hoff | 2018-04-20 | 1 | -19/+12 |
|/ | | | | | | It turns out that most of the time we were calling have_events, we were only using half of the result. Replace have_events with have_seen_events and get_rejection_reasons, so that we can see what's going on a bit more clearly. | ||||
* | s/replication_client/federation_client/ | Erik Johnston | 2018-03-13 | 1 | -1/+1 |
| | |||||
* | Split replication layer into two | Erik Johnston | 2018-03-13 | 1 | -3/+1 |
| | |||||
* | Move RoomMemberHandler out of Handlers | Erik Johnston | 2018-03-01 | 1 | -2/+2 |
| | |||||
* | Delete from push_actions_staging in federation too | Erik Johnston | 2018-02-20 | 1 | -9/+17 |
| | |||||
* | Merge pull request #2847 from matrix-org/erikj/separate_event_creation | Erik Johnston | 2018-02-06 | 1 | -10/+9 |
|\ | | | | | Split event creation into a separate handler | ||||
| * | Update copyright | Erik Johnston | 2018-02-06 | 1 | -0/+1 |
| | | |||||
| * | s/_create_new_client_event/create_new_client_event/ | Erik Johnston | 2018-02-06 | 1 | -5/+5 |
| | | |||||
| * | Update places where we create events | Erik Johnston | 2018-02-05 | 1 | -10/+8 |
| | | |||||
* | | Store state groups separately from events (#2784) | Erik Johnston | 2018-02-06 | 1 | -7/+17 |
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split state group persist into seperate storage func * Add per database engine code for state group id gen * Move store_state_group to StateReadStore This allows other workers to use it, and so resolve state. * Hook up store_state_group * Fix tests * Rename _store_mult_state_groups_txn * Rename StateGroupReadStore * Remove redundant _have_persisted_state_group_txn * Update comments * Comment compute_event_context * Set start val for state_group_id_seq ... otherwise we try to recreate old state groups * Update comments * Don't store state for outliers * Update comment * Update docstring as state groups are ints | ||||
* | Rename resolve_state_groups -> resolve_state_groups_for_events | Richard van der Hoff | 2018-02-01 | 1 | -6/+5 |
| | | | | (to make way for a method that actually just does the state group resolution) | ||||
* | Add federation_domain_whitelist option (#2820) | Matthew Hodgson | 2018-01-22 | 1 | -0/+4 |
| | | | | | | Add federation_domain_whitelist gives a way to restrict which domains your HS is allowed to federate with. useful mainly for gracefully preventing a private but internet-connected HS from trying to federate to the wider public Matrix network | ||||
* | s/items/iteritems/ | Richard van der Hoff | 2017-11-08 | 1 | -2/+2 |
| | |||||
* | Update deltas when doing auth resolution | Richard van der Hoff | 2017-11-07 | 1 | -3/+7 |
| | | | | | Fixes a bug where the persisted state groups were different to those actually being used after auth resolution. | ||||
* | factor out _update_context_for_auth_events | Richard van der Hoff | 2017-11-07 | 1 | -20/+42 |
| | | | | This is duplicated, so let's factor it out before fixing it | ||||
* | replace 'except:' with 'except Exception:' | Richard van der Hoff | 2017-10-23 | 1 | -8/+8 |
| | | | | what could possibly go wrong | ||||
* | Merge pull request #2490 from matrix-org/erikj/drop_left_room_events | Erik Johnston | 2017-10-10 | 1 | -0/+22 |
|\ | | | | | Ignore incoming events for rooms that we have left | ||||
| * | Update comments | Erik Johnston | 2017-10-03 | 1 | -1/+1 |
| | | |||||
| * | Remove spurious line feed | Erik Johnston | 2017-10-03 | 1 | -1/+0 |
| | | |||||
| * | Ignore incoming events for rooms that we have left | Erik Johnston | 2017-10-03 | 1 | -0/+23 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When synapse receives an event for a room its not in over federation, it double checks with the remote server to see if it is in fact in the room. This is done so that if the server has forgotten about the room (usually as a result of the database being dropped) it can recover from it. However, in the presence of state resets in large rooms, this can cause a lot of work for servers that have legitimately left. As a hacky solution that supports both cases we drop incoming events for rooms that we have explicitly left. This means that we no longer support the case of servers having forgotten that they've rejoined a room, but that is sufficiently rare that we're not going to support it for now. | ||||
* | | Fix up deferred handling in federation.py | Richard van der Hoff | 2017-10-06 | 1 | -24/+21 |
| | | | | | | | | | | | | | | * Avoid preserve_context_over_deferred, which is broken * set consumeErrors=True on defer.gatherResults, to avoid spurious "unhandled failure" erros | ||||
* | | Spam checking: add the invitee to user_may_invite | David Baker | 2017-10-05 | 1 | -5/+7 |
| | | |||||
* | | pass room id too | David Baker | 2017-10-03 | 1 | -1/+1 |
| | | |||||
* | | Fix param name & lint | David Baker | 2017-10-03 | 1 | -2/+4 |
| | | |||||
* | | Allow spam checker to reject invites too | David Baker | 2017-10-03 | 1 | -0/+4 |
|/ | |||||
* | Add a config option to block all room invites (#2457) | Richard van der Hoff | 2017-09-19 | 1 | -0/+3 |
| | | | | | - allows sysadmins the ability to lock down their servers so that people can't send their users room invites. | ||||
* | add some comments to on_exchange_third_party_invite_request | Richard van der Hoff | 2017-09-19 | 1 | -0/+11 |
| | |||||
* | Fix overzealous kicking of guest users (#2453) | Richard van der Hoff | 2017-09-19 | 1 | -1/+1 |
| | | | We should only kick guest users if the guest access event is authorised. | ||||
* | Don't compute push actions for backfilled events | Erik Johnston | 2017-07-11 | 1 | -1/+1 |
| | |||||
* | Fix bug where pusherpool didn't start and broke some rooms | Erik Johnston | 2017-07-06 | 1 | -1/+2 |
| | | | | | | | | Since we didn't instansiate the PusherPool at start time it could fail at run time, which it did for some users. This may or may not fix things for those users, but it should happen at start time and stop the server from starting. | ||||
* | Improve the error handling for bad invites received over federation | Mark Haines | 2017-06-30 | 1 | -2/+17 |
| | |||||
* | Add shutdown room API | Erik Johnston | 2017-06-19 | 1 | -0/+4 |
| | |||||
* | Comment | Erik Johnston | 2017-06-09 | 1 | -0/+2 |
| | |||||
* | Mark remote invite rejections as outliers | Erik Johnston | 2017-06-09 | 1 | -0/+1 |
| | |||||
* | Only store event_auth for state events | Erik Johnston | 2017-05-24 | 1 | -6/+14 |
| | |||||
* | Store ActionGenerator in HomeServer | Erik Johnston | 2017-05-19 | 1 | -3/+2 |
| | |||||
* | Remove redundant reset of destination timers | Erik Johnston | 2017-05-05 | 1 | -7/+0 |
| | |||||
* | Merge together redundant calculations/logging | Erik Johnston | 2017-05-03 | 1 | -9/+2 |
| | |||||
* | Fixup | Erik Johnston | 2017-04-28 | 1 | -10/+4 |
| | |||||
* | Remove unncessary call in _get_missing_events_for_pdu | Erik Johnston | 2017-04-28 | 1 | -13/+11 |
| | |||||
* | Don't fetch state for missing events that we fetched | Erik Johnston | 2017-04-28 | 1 | -0/+6 |
| | |||||
* | Typo | Erik Johnston | 2017-04-27 | 1 | -1/+1 |
| | |||||
* | Add some extra logging for edge cases of federation | Erik Johnston | 2017-04-27 | 1 | -2/+22 |
| | |||||
* | Remove redundant try/except clauses | Richard van der Hoff | 2017-04-21 | 1 | -23/+11 |
| | | | | | | | | | | The `except SynapseError` clauses were pointless because the wrapped functions would never throw a `SynapseError` (they either throw a `CodeMessageException` or a `RuntimeError`). The `except CodeMessageException` is now also pointless because the caller treats all exceptions equally, so we may as well just throw the `CodeMessageException`. | ||||
* | Merge branch 'master' of github.com:matrix-org/synapse into develop | Erik Johnston | 2017-04-11 | 1 | -4/+4 |
|\ | |||||
| * | When we do an invite rejection, save the signed leave event to the db | Richard van der Hoff | 2017-04-07 | 1 | -4/+4 |
| | | | | | | | | | | | | | | | | | | | | | | | | During a rejection of an invite received over federation, we ask a remote server to make us a `leave` event, then sign it, then send that with `send_leave`. We were saving the *unsigned* version of the event (which has a different event id to the signed version) to our db (and sending it to the clients), whereas other servers in the room will have seen the *signed* version. We're not aware of any actual problems that caused, except that it makes the database confusing to look at and generally leaves the room in a weird state. | ||||
* | | Merge pull request #2095 from matrix-org/rav/cull_log_preserves | Richard van der Hoff | 2017-04-03 | 1 | -24/+19 |
|\ \ | |/ |/| | Cull spurious PreserveLoggingContexts | ||||
| * | Remove more spurious `PreserveLoggingContext`s | Richard van der Hoff | 2017-04-03 | 1 | -24/+19 |
| | | | | | | | | | | Remove `PreserveLoggingContext` around calls to `Notifier.on_new_room_event`; there is no problem if the logcontext is set when calling it. | ||||
* | | Accept join events from all servers | Richard van der Hoff | 2017-04-03 | 1 | -3/+13 |
|/ | | | | | | | Make sure that we accept join events from any server, rather than just the origin server, to make the federation join dance work correctly. (Fixes #1893). | ||||
* | Merge pull request #2027 from matrix-org/rav/logcontext_leaks | Richard van der Hoff | 2017-03-20 | 1 | -2/+3 |
|\ | | | | | A few fixes to logcontext things | ||||
| * | Stop preserve_fn leaking context into the reactor | Richard van der Hoff | 2017-03-18 | 1 | -2/+3 |
| | | | | | | | | | | | | | | | | Fix a bug in ``logcontext.preserve_fn`` which made it leak context into the reactor, and add a test for it. Also, get rid of ``logcontext.reset_context_after_deferred``, which tried to do the same thing but had its own, different, set of bugs. | ||||
* | | Refactoring and cleanups | Richard van der Hoff | 2017-03-17 | 1 | -0/+10 |
|/ | | | | | | | | | | | | A few non-functional changes: * A bunch of docstrings to document types * Split `EventsStore._persist_events_txn` up a bit. Hopefully it's a bit more readable. * Rephrase `EventFederationStore._update_min_depth_for_room_txn` to avoid mind-bending conditional. * Rephrase rejected/outlier conditional in `_update_outliers_txn` to avoid mind-bending conditional. | ||||
* | Queue up federation PDUs while a room join is in progress | Richard van der Hoff | 2017-03-15 | 1 | -24/+44 |
| | | | | | | | This just takes the existing `room_queues` logic and moves it out to `on_receive_pdu` instead of `_process_received_pdu`, which ensures that we don't start trying to fetch prev_events and whathaveyou until the join has completed. | ||||
* | Move FederationServer._handle_new_pdu to FederationHandler | Richard van der Hoff | 2017-03-09 | 1 | -5/+197 |
| | | | | | | | | | | | Unfortunately this significantly increases the size of the already-rather-big FederationHandler, but the code fits more naturally here, and it paves the way for the tighter integration that I need between handling incoming PDUs and doing the join dance. Other than renaming the existing `FederationHandler.on_receive_pdu` to `_process_received_pdu` to make way for it, this just consists of the move, and replacing `self.handler` with `self` and `self` with `self.replication_layer`. | ||||
* | Pop with default value to stop throwing | Erik Johnston | 2017-02-28 | 1 | -1/+1 |
| | |||||
* | Pop rather than del from dict | Erik Johnston | 2017-02-27 | 1 | -1/+1 |
| | |||||
* | Derive current_state_events from state groups | Erik Johnston | 2017-01-20 | 1 | -1/+0 |
| | |||||
* | Merge pull request #1822 from matrix-org/erikj/statE_logging | Erik Johnston | 2017-01-18 | 1 | -1/+1 |
|\ | | | | | Change resolve_state_groups call site logging to DEBUG | ||||
| * | Change resolve_state_groups call site logging to DEBUG | Erik Johnston | 2017-01-17 | 1 | -1/+1 |
| | | |||||
* | | Fix couple of federation state bugs | Erik Johnston | 2017-01-17 | 1 | -1/+1 |
| | | |||||
* | | Optimise state resolution | Erik Johnston | 2017-01-17 | 1 | -1/+1 |
|/ | |||||
* | Fix case | Matthew Hodgson | 2017-01-05 | 1 | -1/+1 |
| | |||||
* | add logging for all the places we call resolve_state_groups. my kingdom for ↵ | Matthew Hodgson | 2017-01-05 | 1 | -0/+1 |
| | | | | a backtrace that actually works. | ||||
* | Only send events that originate on this server. | Mark Haines | 2017-01-05 | 1 | -0/+4 |
| | | | | | | Or events that are sent via the federation "send_join" API. This should match the behaviour from before v0.18.5 and #1635 landed. | ||||
* | Comment | Erik Johnston | 2016-12-14 | 1 | -0/+2 |
| | |||||
* | Fix /backfill returning events it shouldn't | Erik Johnston | 2016-12-14 | 1 | -2/+3 |
| | |||||
* | Shuffle receipt handler around so that worker apps don't need to load it | Erik Johnston | 2016-11-23 | 1 | -1/+0 |
| | |||||
* | Remove explicit calls to send_pdu | Erik Johnston | 2016-11-21 | 1 | -53/+0 |
| | |||||
* | Use new federation_sender DI | Erik Johnston | 2016-11-16 | 1 | -3/+4 |
| | |||||
* | Add comments | Erik Johnston | 2016-09-22 | 1 | -0/+3 |
| | |||||
* | Allow invites via 3pid to bypass sender sig check | Erik Johnston | 2016-09-22 | 1 | -6/+6 |
| | | | | | | | | | | | | | | When a server sends a third party invite another server may be the one that the inviting user registers with. In this case it is that remote server that will issue an actual invitation, and wants to do it "in the name of" the original invitee. However, the new proper invite will not be signed by the original server, and thus other servers would reject the invite if it was seen as coming from the original user. To fix this, a special case has been added to the auth rules whereby another server can send an invite "in the name of" another server's user, so long as that user had previously issued a third party invite that is now being accepted. | ||||
* | Ensure we don't mutate state cache entries | Erik Johnston | 2016-09-14 | 1 | -0/+4 |
| | |||||
* | Use get_joined_users_from_context instead of manually looking up hosts | Erik Johnston | 2016-09-05 | 1 | -8/+11 |
| | |||||
* | Merge pull request #1064 from matrix-org/erikj/on_receive_check | Erik Johnston | 2016-09-02 | 1 | -6/+18 |
|\ | | | | | Only check if host is in room if we have state and auth_chain | ||||
| * | Comment on when auth chain and state are None | Erik Johnston | 2016-09-02 | 1 | -0/+3 |
| | | |||||
| * | Comment | Erik Johnston | 2016-09-02 | 1 | -0/+3 |
| | | |||||
| * | Only check if host is in room if we have state and auth_chain | Erik Johnston | 2016-09-02 | 1 | -6/+12 |
| | | |||||
* | | Docstrings | Erik Johnston | 2016-09-02 | 1 | -0/+4 |
| | | |||||
* | | Only pull out IDs from DB for /state_ids/ request | Erik Johnston | 2016-09-02 | 1 | -0/+26 |
|/ | |||||
* | Correctly handle the difference between prev and current state | Erik Johnston | 2016-08-31 | 1 | -9/+22 |
| | |||||
* | Measure _filter_events_for_server | Erik Johnston | 2016-08-26 | 1 | -0/+2 |
| | |||||
* | Don't pull out full state for _filter_events_for_server | Erik Johnston | 2016-08-26 | 1 | -1/+25 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/state_ids | Erik Johnston | 2016-08-26 | 1 | -1/+3 |
|\ | |||||
| * | Fix None check in backfill | Erik Johnston | 2016-08-25 | 1 | -1/+3 |
| | | |||||
* | | Replace context.current_state with context.current_state_ids | Erik Johnston | 2016-08-25 | 1 | -48/+64 |
| | | |||||
* | | Pull out event ids rather than full events for state | Erik Johnston | 2016-08-25 | 1 | -0/+12 |
|/ | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2016-08-24 | 1 | -2/+2 |
|\ | | | | | | | erikj/preserve_log_contexts | ||||
| * | Add None checks to backfill | Erik Johnston | 2016-08-24 | 1 | -2/+2 |
| | | |||||
* | | Preserve some logcontexts | Erik Johnston | 2016-08-24 | 1 | -13/+15 |
|/ | |||||
* | Limit number of extremeties in backfill request | Erik Johnston | 2016-08-16 | 1 | -4/+5 |
| | | | | | This works around a bug where if we make a backfill request with too many extremeties it causes the request URI to be too long. | ||||
* | Also check if server is in the room | Erik Johnston | 2016-08-10 | 1 | -2/+7 |
| | |||||
* | Correctly auth /event/ requests | Erik Johnston | 2016-08-10 | 1 | -5/+6 |
| | |||||
* | Only resign our own events | Erik Johnston | 2016-08-10 | 1 | -9/+10 |
| | |||||
* | Fix backfill auth events | Erik Johnston | 2016-08-05 | 1 | -21/+50 |
| | |||||
* | Merge pull request #940 from matrix-org/erikj/fed_state_cache | Erik Johnston | 2016-08-02 | 1 | -6/+1 |
|\ | | | | | Cache federation state responses | ||||
| * | Cache federation state responses | Erik Johnston | 2016-07-21 | 1 | -6/+1 |
| | | |||||
* | | Mention that func will fetch auth events | Erik Johnston | 2016-07-29 | 1 | -0/+2 |
| | | |||||
* | | Update docstring | Erik Johnston | 2016-07-29 | 1 | -0/+6 |
| | | |||||
* | | Handle the case of missing auth events when joining a room | Erik Johnston | 2016-07-28 | 1 | -4/+23 |
|/ | |||||
* | Don't notify pusher pool for backfilled events | Erik Johnston | 2016-07-20 | 1 | -5/+6 |
| | |||||
* | Comment | Erik Johnston | 2016-07-15 | 1 | -0/+4 |
| | |||||
* | Check sender signed event | Erik Johnston | 2016-07-14 | 1 | -2/+2 |
| | |||||
* | Add purge_history API | Erik Johnston | 2016-07-05 | 1 | -1/+1 |
| | |||||
* | Only re-sign our own events | Erik Johnston | 2016-06-17 | 1 | -6/+9 |
| | |||||
* | Correctly mark backfilled events as backfilled | Erik Johnston | 2016-06-15 | 1 | -14/+16 |
| | |||||
* | Remove dead code. | Mark Haines | 2016-06-07 | 1 | -13/+0 |
| | | | | | | | | | | | Loading push rules now happens in the datastore, so we can remove the methods that loaded them outside the datastore. The ``waiting_for_join_list`` in federation handler is populated by anything, so can be removed. The ``_get_members_events_txn`` method isn't called from anywhere so can be removed. | ||||
* | Spell "domain" correctly | Mark Haines | 2016-05-16 | 1 | -4/+4 |
| | | | | s/domian/domain/g | ||||
* | missed a spot | Mark Haines | 2016-05-12 | 1 | -1/+1 |
| | |||||
* | Move _create_new_client_event and handle_new_client_event out of base handler | Mark Haines | 2016-05-11 | 1 | -5/+12 |
| | |||||
* | Add and use get_domian_from_id | Erik Johnston | 2016-05-09 | 1 | -8/+4 |
| | |||||
* | Don't auto log failed auth checks | Erik Johnston | 2016-04-13 | 1 | -8/+26 |
| | |||||
* | More comments | Erik Johnston | 2016-04-12 | 1 | -0/+9 |
| | |||||
* | More comments | Erik Johnston | 2016-04-12 | 1 | -0/+6 |
| | |||||
* | Don't append to unused list | Erik Johnston | 2016-04-12 | 1 | -4/+0 |
| |