| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Ensure that the the default settings for the room directory are that the it is hidden from public view by default.
|
|
|
|
|
|
|
|
| |
Implement part [MSC2228](https://github.com/matrix-org/matrix-doc/pull/2228). The parts that differ are:
* the feature is hidden behind a configuration flag (`enable_ephemeral_messages`)
* self-destruction doesn't happen for state events
* only implement support for the `m.self_destruct_after` field (not the `m.self_destruct` one)
* doesn't send synthetic redactions to clients because for this specific case we consider the clients to be able to destroy an event themselves, instead we just censor it (by pruning its JSON) in the database
|
| |
|
| |
|
| |
|
|\
| |
| | |
Implement message retention policies (MSC1763)
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
As per MSC1763, 'Retention is only considered for non-state events.', so don't filter out state events based on the room's retention policy.
|
| | | |
|
| |/
|/|
| |
| | |
public_baseurl (#6379)
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Split purge API into events vs state and add PurgeEventsStorage
|
| | |
| | |
| | |
| | | |
And fix the tests to actually test that things got deleted.
|
| |\ \
| | | |
| | | |
| | | | |
erikj/split_purge_history
|
| |\ \ \
| | | |/
| | |/|
| | | | |
erikj/split_purge_history
|
| |\ \ \
| | | | |
| | | | |
| | | | | |
erikj/split_purge_history
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
(#6320)
Fixes a bug where rejected events were persisted with the wrong state group.
Also fixes an occasional internal-server-error when receiving events over
federation which are rejected and (possibly because they are
backwards-extremities) have no prev_group.
Fixes #6289.
|
|\ \ \ \ \
| | |_|_|/
| |/| | | |
|
| | |_|/
| |/| |
| | | | |
* remove psutil and replace with resource
|
| |\ \ \
| | | | |
| | | | | |
Implement MSC2326 (label based filtering)
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The intention here is to make it clearer which fields we can expect to be
populated when: notably, that the _event_type etc aren't used for the
synchronous impl of EventContext.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The `http_proxy` and `HTTPS_PROXY` env vars can be set to a `host[:port]` value which should point to a proxy.
The address of the proxy should be excluded from IP blacklists such as the `url_preview_ip_range_blacklist`.
The proxy will then be used for
* push
* url previews
* phone-home stats
* recaptcha validation
* CAS auth validation
It will *not* be used for:
* Application Services
* Identity servers
* Outbound federation
* In worker configurations, connections from workers to masters
Fixes #4198.
|
| |\ \ \ \
| | | |_|/
| | |/| | |
|
| | |\ \ \
| | | | | |
| | | | | | |
Add StateGroupStorage interface
|
| | | | |/
| | | |/| |
|
| | |/ / |
|
| | | | |
|
| |\| | |
|
| | |\ \
| | | | |
| | | | |
| | | | | |
erikj/split_out_persistence_store
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This makes it easier to use in an async/await world.
Also fixes a bug where cache descriptors would occaisonally return a raw
value rather than a deferred.
|
| | | |/ |
|
| | | | |
|
| | | |\
| | | | |
| | | | | |
delete keys when deleting backup versions
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| |\ \ \ \
| | | |_|/
| | |/| | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Co-Authored-By: Brendan Abolivier <babolivier@matrix.org>
Co-Authored-By: Erik Johnston <erik@matrix.org>
|
| |_|_|/
|/| | |
| | | |
| | | | |
... to stop people causing DoSes with malicious web pages
|
| |/ /
|/| | |
|
| |/
|/|
| |
| | |
The expected use case is to suppress MAU limiting on small instances
|
|\|
| |
| |
| | |
erikj/refactor_stores
|
| |\ |
|
| |\ \ |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | |_|/
| |/| |
| | | | |
erikj/refactor_stores
|
| |\ \ \ |
|
| |\ \ \ \
| | |_|/ /
| |/| | /
| | | |/
| | |/| |
|
| |\ \ \ |
|
| |\ \ \ \ |
|
| | | | | | |
|
| |\ \ \ \ \ |
|
| | | | | | | |
|
| |_|_|_|_|/
|/| | | | |
| | | | | |
| | | | | |
| | | | | | |
This is in preparation for having multiple data stores that offer
different functionality, e.g. splitting out state or event storage.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* Fix presence timeouts when synchrotron restarts.
Handling timeouts would fail if there was an external process that had
timed out, e.g. a synchrotron restarting. This was due to a couple of
variable name typoes.
Fixes #3715.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
make storage layer in charge of interpreting the device key data
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
make version optional in body of e2e backup version update
|
| | | | | | | | |
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
to agree with latest version of the MSC
|
| | | | | | | |
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add more log context checks when patching inlineCallbacks
|
| |\ \ \ \ \ \ \ |
|
| | | | | | | | | |
|
| |\ \ \ \ \ \ \ \
| | | |/ / / / / /
| | |/| | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| |_|/ / / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This fixed the weirdness of 400 vs 404 as http status code in the case
the filter id is not known by the server.
As e.g. matrix-js-sdk expects 404 to catch this situation this leads
to unwanted behaviour.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Hopefully this will fix the occasional failures we were seeing in the room directory.
The problem was that events are not necessarily persisted (and `current_state_delta_stream` updated) in the same order as their stream_id. So for instance current_state_delta 9 might be persisted *before* current_state_delta 8. Then, when the room stats saw stream_id 9, it assumed it had done everything up to 9, and never came back to do stream_id 8.
We can solve this easily by only processing up to the stream_id where we know all events have been persisted.
|
| |/ / / / / /
|/| | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Don't 500 when trying to exchange a revoked 3PID invite
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Use room_stats and room_state for room directory search
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix errors storing large retry intervals.
|
| | |/ / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We have set the max retry interval to a value larger than a postgres or
sqlite int can hold, which caused exceptions when updating the
destinations table.
To fix postgres we need to change the column to a bigint, and for sqlite
we lower the max interval to 2**62 (which is still incredibly long).
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fetching a censored redactions caused an exception due to the code
expecting redactions to have a `redact` key, which redacted redactions
don't have.
|
| | | | | | | |
|
| | | | | | | |
|
|/ / / / / / |
|
| | | | | |
| | | | | |
| | | | | | |
Fixes #5905
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
erikj/cleanup_user_ips_2
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
erikj/cleanup_user_ips
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
If email or msisdn verification aren't supported, let's stop advertising them
for registration.
Fixes #6100.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Pull the checkers out to their own classes, rather than having them lost in a
massive 1000-line class which does everything.
This is also preparation for some more intelligent advertising of flows, as per #6100
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
because, frankly, it looked like it was written by an axe-murderer.
This should be a non-functional change, except that where `m.login.dummy` was
previously advertised *before* `m.login.terms`, it will now be advertised
afterwards. AFAICT that should have no effect, and will be more consistent with
the flows that involve passing a 3pid.
|
|/ / / / / / / |
|
| | | | | | | |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is a) simpler than querying user_ips directly and b) means we can
purge older entries from user_ips without losing the required info.
The storage functions now no longer return the access_token, since it
was unused.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Track the time that a server started failing at, for general analysis purposes.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This allows support users to be created even on MAU limits via
the admin API. Support users are excluded from MAU after creation,
so it makes sense to exclude them in creation - except if the
whole host is in disabled state.
Signed-off-by: Jason Robinson <jasonr@matrix.org>
|
| | | | | |
| | | | | |
| | | | | | |
Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Only count real users when checking for auto-creation of auto-join room
|
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously if the first registered user was a "support" or "bot" user,
when the first real user registers, the auto-join rooms were not
created.
Fix to exclude non-real (ie users with a special user type) users
when counting how many users there are to determine whether we should
auto-create a room.
Signed-off-by: Jason Robinson <jasonr@matrix.org>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Censor redactions in DB after a month
|
| |\ \ \ \ \ \
| | | |_|_|_|/
| | |/| | | |
| | | | | | | |
erikj/censor_redactions
|
| | | | | | | |
|
| | | | | | | |
|
| | |_|_|_|/
| |/| | | | |
|
| |_|/ / /
|/| | | | |
|
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | | |
Previously the stats were not being correctly populated.
|
|/ / /
| | |
| | |
| | |
| | | |
Python will return a tuple whether there are parentheses around the returned values or not.
I'm just sick of my editor complaining about this all over the place :)
|
|\ \ \
| | | |
| | | | |
Exempt support users from consent
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Template config files
* Imagine a system composed entirely of x, y, z etc and the basic operations..
Wait George, why XOR? Why not just neq?
George: Eh, I didn't think of that..
Co-Authored-By: Erik Johnston <erik@matrix.org>
|
| | | | |
|
|\| | |
| | | |
| | | |
| | | | |
erikj/reliable_lookups
|
| |\ \ \
| | | | |
| | | | | |
Retry well known on fail
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If we have recently seen a valid well-known for a domain we want to
retry on (non-final) errors a few times, to handle temporary blips in
networking/etc.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Get rid of the labyrinthine `recoverer_fn` code, and clean up the startup code
(it seemed to be previously inexplicably split between
`ApplicationServiceScheduler.start` and `_Recoverer.start`).
Add some docstrings too.
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This refactors MatrixFederationAgent to move the SRV lookup into the
endpoint code, this has two benefits:
1. Its easier to retry different host/ports in the same way as
HostnameEndpoint.
2. We avoid SRV lookups if we have a free connection in the pool
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This gives a bit of a grace period where we can attempt to refetch a
remote `well-known`, while still using the cached result if that fails.
Hopefully this will make the well-known resolution a bit more torelant
of failures, rather than it immediately treating failures as "no result"
and caching that for an hour.
|
|\ \ \
| | | |
| | | | |
Add a lower bound to well-known TTL.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It costs both us and the remote server for us to fetch the well known
for every single request we send, so we add a minimum cache period. This
is set to 5m so that we still honour the basic premise of "refetch
frequently".
|
|\ \ \ \
| |/ / /
|/| | | |
Fix handling of redactions of redactions
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Account validity: allow defining HTML templates to serve the user on account renewal attempt
|
| | |_|/
| |/| | |
|
|\ \ \ \
| | | | |
| | | | | |
Share SSL options for well-known requests
|
| |/ / / |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Add unit test for current state membership bg update
|
| | | | |
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
The `expire_access_token` didn't do what it sounded like it should do. What it
actually did was make Synapse enforce the 'time' caveat on macaroons used as
access tokens, but since our access token macaroons never contained such a
caveat, it was always a no-op.
(The code to add 'time' caveats was removed back in v0.18.5, in #1656)
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There was some inconsistent behaviour in the caching layer around how
exceptions were handled - particularly synchronously-thrown ones.
This seems to be most easily handled by pushing the creation of
ObservableDeferreds down from CacheDescriptor to the Cache.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bugfixes
--------
- Fix a regression introduced in v1.2.0rc1 which led to incorrect labels on some prometheus metrics. ([\#5734](https://github.com/matrix-org/synapse/issues/5734))
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Fix servlet metric names
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Remove redundant check
* Cover all return paths
|
| |/
|/| |
|
|/
|
|
|
| |
There's an awful lot of deferreds and dictionaries flying around here. The
whole thing can be made much simpler and achieve the same effect.
|
| |
|
|
|
|
|
|
|
| |
(#5629)
Fixes #5594
Forbid viewing relations on an event once it has been redacted.
|
| |
|
|
|
|
|
|
|
|
| |
We can now use `_get_events_from_cache_or_db` rather than going right back to
the database, which means that (a) we can benefit from caching, and (b) it
opens the way forward to more extensive checks on the original event.
We now always require the original event to exist before we will serve up a
redaction.
|
|\
| |
| | |
Add basic function to get all data for a user out of synapse
|
| |\
| | |
| | |
| | | |
erikj/admin_exfiltrate_data
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Record how long an access token is valid for, and raise a soft-logout once it
expires.
|
| | |
| | |
| | |
| | |
| | |
| | | |
It's useful to be able to tweak the homeserver config to be used for each
test. This PR adds a mechanism to do so.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
First of all, let's get rid of `TOKEN_NOT_FOUND_HTTP_STATUS`. It was a hack we
did at one point when it was possible to return either a 403 or a 401 if the
creds were missing. We always return a 401 in these cases now (thankfully), so
it's not needed.
Let's also stop abusing `AuthError` for these cases. Honestly they have nothing
that relates them to the other places that `AuthError` is used, other than the
fact that they are loosely under the 'Auth' banner. It makes no sense for them
to share exception classes.
Instead, let's add a couple of new exception classes: `InvalidClientTokenError`
and `MissingClientTokenError`, for the `M_UNKNOWN_TOKEN` and `M_MISSING_TOKEN`
cases respectively - and an `InvalidClientCredentialsError` base class for the
two of them.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
this is only used in one place, so it's clearer if we inline it and reduce the
API surface.
Also, fixes a buglet where we would create an access token even if we were
about to block the user (we would never return the AT, so the user could never
use it, but it was still created and added to the db.)
|
| | |
| | |
| | |
| | |
| | | |
The 'token' param is no longer used anywhere except the tests, so let's kill
that off too.
|
| | |
| | |
| | | |
When asking for the relations of an event, include the original event in the response. This will mostly be used for efficiently showing edit history, but could be useful in other circumstances.
|
|\ \ \
| | | |
| | | | |
Allow newly-registered users to lookup their own profiles
|
| | | | |
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Nothing uses this now, so we can remove the dead code, and clean up the
API.
Since we're changing the shape of the return value anyway, we take the
opportunity to give the method a better name.
|
| | |
| | |
| | | |
This is only used in tests, so...
|
| |/
|/|
| |
| |
| | |
Riot team would like some extra fields as part of m.replace, so here you go.
Fixes: #5598
|
| |
| |
| |
| |
| |
| |
| | |
- Put the default window_size back to 1000ms (broken by #5181)
- Make the `rc_federation` config actually do something
- fix an off-by-one error in the 'concurrent' limit
- Avoid creating an unused `_PerHostRatelimiter` object for every single
incoming request
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
federation (#5550)
|
| |
|
|
|
|
|
|
| |
* Pull config_dir_path and data_dir_path calculation out of read_config_files
* Pass config_dir_path and data_dir_path into read_config
|
| |
|
| |
|
|
|
|
|
|
|
| |
Adds new config option `cleanup_extremities_with_dummy_events` which
periodically sends dummy events to rooms with more than 10 extremities.
THIS IS REALLY EXPERIMENTAL.
|
|\
| |
| | |
Fix email notifications for unnamed rooms with multiple people
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Allow server admins to define implementations of extra rules for allowing or denying incoming events
|
| | | |
|
|\ \ \
| | | |
| | | | |
Prometheus histograms are cumalative
|
| | | | |
|
|/ / / |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \ |
|
| | | | |
|
| |/ / |
|
|\| | |
|
| |\ \
| | | |
| | | | |
Share an SSL context object between SSL connections
|
| | | | |
|
| | | | |
|
| | |/
| | |
| | |
| | | |
Add some tests for bad certificates for federation and .well-known connections
|
|\| |
| | |
| | | |
Fix key verification when key stored with null valid_until_ms
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some keys are stored in the synapse database with a null valid_until_ms
which caused an exception to be thrown when using that key. We fix this
by treating nulls as zeroes, i.e. they keys will match verification
requests with a minimum_valid_until_ms of zero (i.e. don't validate ts)
but will not match requests with a non-zero minimum_valid_until_ms.
Fixes #5391.
|
|\ \
| |/
|/|
| |
| | |
matrix-org/babolivier/account_validity_send_mail_auth
Don't check whether the user's account is expired on /send_mail requests
|
| | |
|
| |
| |
| | |
fixes #5153
|
| |
| |
| |
| | |
Set default room version to v4.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
identity server (#5377)
Sends password reset emails from the homeserver instead of proxying to the identity server. This is now the default behaviour for security reasons. If you wish to continue proxying password reset requests to the identity server you must now enable the email.trust_identity_server_for_password_resets option.
This PR is a culmination of 3 smaller PRs which have each been separately reviewed:
* #5308
* #5345
* #5368
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are a few changes going on here:
* We make checking the signature on a key server response optional: if no
verify_keys are specified, we trust to TLS to validate the connection.
* We change the default config so that it does not require responses to be
signed by the old key.
* We replace the old 'perspectives' config with 'trusted_key_servers', which
is also formatted slightly differently.
* We emit a warning to the logs every time we trust a key server response
signed by the old key.
|
|\ \
| | |
| | | |
Validate federation server TLS certificates by default.
|
| |\ \ |
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
Associate a request_name with each verify request, for logging
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
Also:
* rename VerifyKeyRequest->VerifyJsonRequest
* calculate key_ids on VerifyJsonRequest construction
* refactor things to pass around VerifyJsonRequests instead of 4-tuples
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
* Fix background updates to handle redactions/rejections
In background updates based on current state delta stream we need to
handle that we may not have all the events (or at least that
`get_events` may raise an exception).
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
When handling incoming federation requests, make sure that we have an
up-to-date copy of the signing key.
We do not yet enforce the validity period for event signatures.
|
| | |
|
|\ \
| | |
| | | |
Limit displaynames and avatar URLs
|
| | | |
|
|\ \ \
| | | |
| | | | |
Allow configuring a range for the account validity startup job
|
| | | | |
|
| | | | |
|
| | | | |
|
| | |/
| |/|
| | |
| | |
| | | |
When enabling the account validity feature, Synapse will look at startup for registered account without an expiration date, and will set one equals to 'now + validity_period' for them. On large servers, it can mean that a large number of users will have the same expiration date, which means that they will all be sent a renewal email at the same time, which isn't ideal.
In order to mitigate this, this PR allows server admins to define a 'max_delta' so that the expiration date is a random value in the [now + validity_period ; now + validity_period + max_delta] range. This allows renewal emails to be progressively sent over a configured period instead of being sent all in one big batch.
|
|\ \ \
| | | |
| | | | |
Add DB bg update to cleanup extremities.
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Ensure that server_keys fetched via a notary server are correctly signed.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The list of server names was redundant, since it was equivalent to the keys on
the server_to_deferred map. This reduces the number of large lists being passed
around, and has the benefit of deduplicating the entries in `wait_on`.
|
|\| | |
| | | |
| | | | |
Factor out KeyFetchers from KeyRing
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Rather than have three methods which have to have the same interface,
factor out a separate interface which is provided by three implementations.
I find it easier to grok the code this way.
|
|/ / /
| | |
| | |
| | |
| | | |
Replaces DEFAULT_ROOM_VERSION constant with a method that first checks the config, then returns a hardcoded value if the option is not present.
That hardcoded value is now located in the server.py config file.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a first step to checking that the key is valid at the required moment.
The idea here is that, rather than passing VerifyKey objects in and out of the
storage layer, we instead pass FetchKeyResult objects, which simply wrap the
VerifyKey and add a valid_until_ts field.
|
| | |
| | |
| | |
| | |
| | | |
Storing server keys hammered the database a bit. This replaces the
implementation which stored a single key, with one which can do many updates at
once.
|