- Nov 16, 2020
-
-
Richard van der Hoff authored
-
- Nov 15, 2020
-
-
Richard van der Hoff authored
Where we want to render a request against a specific Resource, call the global make_request() function rather than the one in HomeserverTestCase, allowing us to pass in an appropriate `Site`.
-
- Sep 29, 2020
-
-
Richard van der Hoff authored
* Remove `on_timeout_cancel` from `timeout_deferred` The `on_timeout_cancel` param to `timeout_deferred` wasn't always called on a timeout (in particular if the canceller raised an exception), so it was unreliable. It was also only used in one place, and to be honest it's easier to do what it does a different way. * Fix handling of connection timeouts in outgoing http requests Turns out that if we get a timeout during connection, then a different exception is raised, which wasn't always handled correctly. To fix it, catch the exception in SimpleHttpClient and turn it into a RequestTimedOutError (which is already a documented exception). Also add a description to RequestTimedOutError so that we can see which stage it failed at. * Fix incorrect handling of timeouts reading federation responses This was trapping the wrong sort of TimeoutError, so was never being hit. The effect was relatively minor, but we should fix this so that it does the expected thing. * Fix inconsistent handling of `timeout` param between methods `get_json`, `put_json` and `delete_json` were applying a different timeout to the response body to `post_json`; bring them in line and test. Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by:
Erik Johnston <erik@matrix.org>
-
- Sep 10, 2020
-
-
Patrick Cloke authored
-
Dan Callaghan authored
Some Linux distros have begun disabling TLSv1.0 and TLSv1.1 by default for security reasons, for example in Fedora 33 onwards: https://fedoraproject.org/wiki/Changes/StrongCryptoSettings2 Use TLSv1.2 for the fake TLS servers created in the test suite, to avoid failures due to OpenSSL disallowing TLSv1.0: <twisted.python.failure.Failure OpenSSL.SSL.Error: [('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')]> Signed-off-by:
Dan Callaghan <djc@djc.id.au>
-
- Sep 04, 2020
-
-
Patrick Cloke authored
-
- Sep 01, 2020
-
-
Patrick Cloke authored
-
- Aug 27, 2020
-
-
Andrew Morgan authored
-
- Jul 30, 2020
-
-
Patrick Cloke authored
-
- Jul 23, 2020
-
-
Patrick Cloke authored
-
- Jul 03, 2020
-
-
Erik Johnston authored
-
- Jun 16, 2020
-
-
Patrick Cloke authored
-
- Mar 24, 2020
-
-
Richard van der Hoff authored
* Pull Sentinel out of LoggingContext ... and drop a few unnecessary references to it * Factor out LoggingContext.current_context move `current_context` and `set_context` out to top-level functions. Mostly this means that I can more easily trace what's actually referring to LoggingContext, but I think it's generally neater. * move copy-to-parent into `stop` this really just makes `start` and `stop` more symetric. It also means that it behaves correctly if you manually `set_log_context` rather than using the context manager. * Replace `LoggingContext.alive` with `finished` Turn `alive` into `finished` and make it a bit better defined.
-
- Mar 17, 2020
-
-
Richard van der Hoff authored
Extends #5794 etc to the SimpleHttpClient so that it also applies to non-federation requests. Fixes #7092.
-
- Nov 01, 2019
-
-
Richard van der Hoff authored
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.
-
- Aug 20, 2019
-
-
Erik Johnston authored
-
Erik Johnston authored
-
- Aug 15, 2019
-
-
Erik Johnston authored
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
-
Erik Johnston authored
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.
-
- Aug 13, 2019
-
-
Erik Johnston authored
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.
-
- Aug 07, 2019
-
-
Erik Johnston authored
-
- Aug 06, 2019
-
-
Erik Johnston authored
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".
-
- Jul 31, 2019
-
-
Erik Johnston authored
-
- Jul 23, 2019
-
-
Amber Brown authored
-
- Jul 03, 2019
-
-
Amber Brown authored
-
- Jun 24, 2019
-
-
Richard van der Hoff authored
* 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
-
- Jun 20, 2019
-
-
Amber Brown authored
-
- Jun 10, 2019
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
-
Richard van der Hoff authored
Add some tests for bad certificates for federation and .well-known connections
-
- Jun 06, 2019
-
-
Richard van der Hoff authored
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.
-
- Jun 05, 2019
-
-
Richard van der Hoff authored
-
- May 13, 2019
-
-
Amber Brown authored
Migrate all tests to use the dict-based config format instead of hanging items off HomeserverConfig (#5171)
-
Andrew Morgan authored
-
- May 10, 2019
-
-
Amber Brown authored
-
- Apr 25, 2019
-
-
Andrew Morgan authored
-
- Mar 20, 2019
-
-
Andrew Morgan authored
-
Andrew Morgan authored
-
Andrew Morgan authored
-
Andrew Morgan authored
-