- Mar 26, 2021
-
-
Erik Johnston authored
-
Erik Johnston authored
-
Erik Johnston authored
-
- Mar 22, 2021
-
- Mar 16, 2021
-
-
Andrew Morgan authored
-
Andrew Morgan authored
-
Andrew Morgan authored
-
Andrew Morgan authored
Fixes https://github.com/matrix-org/synapse/issues/9572 When a SSO user logs in for the first time, we create a local Matrix user for them. This goes through the register_user flow, which ends up triggering the spam checker. Spam checker modules don't currently have any way to differentiate between a user trying to sign up initially, versus an SSO user (whom has presumably already been approved elsewhere) trying to log in for the first time. This PR passes `auth_provider_id` as an argument to the `check_registration_for_spam` function. This argument will contain an ID of an SSO provider (`"saml"`, `"cas"`, etc.) if one was used, else `None`.
-
Mathieu Velten authored
Co-authored-by:
Will Hunt <willh@matrix.org> Co-authored-by:
Erik Johnston <erik@matrix.org>
-
Patrick Cloke authored
* Handle an empty cookie as an invalid macaroon. * Newsfragment
-
Richard van der Hoff authored
The stable format uses different brand identifiers, so we need to support two identifiers for each IdP.
-
Richard van der Hoff authored
... and complain if people try to turn it off.
-
Andrew Morgan authored
There's no need to do aggregation bundling for state events. Doing so can cause performance issues.
-
Richard van der Hoff authored
* Fix Internal Server Error on `GET /saml2/authn_response` Seems to have been introduced in #8765 (Synapse 1.24.0) * Fix newsfile
-
- Mar 15, 2021
-
-
Patrick Cloke authored
-
Patrick Cloke authored
-
Erik Johnston authored
Federation catch up mode is very inefficient if the number of events that the remote server has missed is small, since handling gaps can be very expensive, c.f. #9492. Instead of going into catch up mode whenever we see an error, we instead do so only if we've backed off from trying the remote for more than an hour (the assumption being that in such a case it is more than a transient failure).
-
Richard van der Hoff authored
Background: When we receive incoming federation traffic, and notice that we are missing prev_events from the incoming traffic, first we do a `/get_missing_events` request, and then if we still have missing prev_events, we set up new backwards-extremities. To do that, we need to make a `/state_ids` request to ask the remote server for the state at those prev_events, and then we may need to then ask the remote server for any events in that state which we don't already have, as well as the auth events for those missing state events, so that we can auth them. This PR attempts to optimise the processing of that state request. The `state_ids` API returns a list of the state events, as well as a list of all the auth events for *all* of those state events. The optimisation comes from the observation that we are currently loading all of those auth events into memory at the start of the operation, but we almost certainly aren't going to need *all* of the auth events. Rather, we can check that we have them, and leave the actual load into memory for later. (Ideally the federation API would tell us which auth events we're actually going to need, but it doesn't.) The effect of this is to reduce the number of events that I need to load for an event in Matrix HQ from about 60000 to about 22000, which means it can stay in my in-memory cache, whereas previously the sheer number of events meant that all 60K events had to be loaded from db for each request, due to the amount of cache churn. (NB I've already tripled the size of the cache from its default of 10K). Unfortunately I've ended up basically C&Ping `_get_state_for_room` and `_get_events_from_store_or_dest` into a new method, because `_get_state_for_room` is also called during backfill, which expects the auth events to be returned, so the same tricks don't work. That said, I don't really know why that codepath is completely different (ultimately we're doing the same thing in setting up a new backwards extremity) so I've left a TODO suggesting that we clean it up.
-
- Mar 12, 2021
-
-
Patrick Cloke authored
-
Richard van der Hoff authored
If more transactions arrive from an origin while we're still processing the first one, reject them. Hopefully a quick fix to https://github.com/matrix-org/synapse/issues/9489
-
Richard van der Hoff authored
Put the room id in the logcontext, to make it easier to understand what's going on.
-
- Mar 11, 2021
-
-
Richard van der Hoff authored
-
Patrick Cloke authored
-
Dirk Klimpel authored
Fixes: #8393
-
- Mar 10, 2021
-
-
Richard van der Hoff authored
... because namedtuples suck Fix up a couple of other annotations to keep mypy happy.
-
Richard van der Hoff authored
We either need to pass the auth provider over the replication api, or make sure we report the auth provider on the worker that received the request. I've gone with the latter.
-
Jason Robinson authored
Mention that parse_config must exist and note the check_media_file_for_spam method.
-
Patrick Cloke authored
This uses a simplified version of get_chain_cover_difference to calculate auth chain of events.
-
Patrick Cloke authored
-
- Mar 09, 2021
-
-
Patrick Cloke authored
-
Patrick Cloke authored
This is a companion change to apply the fix in #9498 / 922788c6 to previously purged rooms.
-
Andrew Morgan authored
Earlier [I was convinced](https://github.com/matrix-org/synapse/issues/9565) that we didn't have an Admin API for listing media uploaded by a user. Foolishly I was looking under the Media Admin API documentation, instead of the User Admin API documentation. I thought it'd be helpful to link to the latter so others don't hit the same dead end :)
-
Richard van der Hoff authored
Apple had to be special. They want a client secret which is generated from an EC key. Fixes #9220. Also fixes #9212 while I'm here.
-
Erik Johnston authored
Fixes #8915
-
Patrick Cloke authored
Type hint fixes due to Twisted 21.2.0 adding type hints.
-
Patrick Cloke authored
Properly uses RGBA mode for 1- and 8-bit images with transparency (instead of RBG mode).
-
Patrick Cloke authored
The hashes are from commits due to auto-formatting, e.g. running black. git can be configured to use this automatically by running the following: git config blame.ignoreRevsFile .git-blame-ignore-revs
-
Erik Johnston authored
After 0764d0c6
-
Andrew Morgan authored
I noticed that I'd occasionally have `scripts-dev/lint.sh` fail when messing about with config options in my PR. The script calls `scripts-dev/config-lint.sh`, which attempts some validation on the sample config. It does this by using `sed` to edit the sample_config, and then seeing if the file changed using `git diff`. The problem is: if you changed the sample_config as part of your commit, this script will error regardless. This PR attempts to change the check so that existing, unstaged changes to the sample_config will not cause the script to report an invalid file.
-