- Sep 29, 2021
-
-
Patrick Cloke authored
-
- Sep 24, 2021
-
-
Erik Johnston authored
-
- Aug 11, 2021
-
-
Dirk Klimpel authored
Signed-off-by:
Marcus Hoffmann <bubu@bubu1.eu> Signed-off-by:
Dirk Klimpel <dirk@klimpel.org>
-
- Jul 27, 2021
-
-
Dirk Klimpel authored
-
- Jul 15, 2021
-
-
Dirk Klimpel authored
-
- Jul 13, 2021
-
-
Jonathan de Jong authored
-
- Apr 23, 2021
-
-
Richard van der Hoff authored
* Simplify `start_listening` callpath * Correctly check the size of uploaded files
-
Richard van der Hoff authored
-
- Apr 14, 2021
-
-
Jonathan de Jong authored
Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by:
Jonathan de Jong <jonathan@automatia.nl>`>
-
- Apr 09, 2021
-
-
Patrick Cloke authored
-
- Apr 08, 2021
-
-
Jonathan de Jong authored
Part of #9366 Adds in fixes for B006 and B008, both relating to mutable parameter lint errors. Signed-off-by:
Jonathan de Jong <jonathan@automatia.nl>
-
- Mar 22, 2021
-
-
Andrew Morgan authored
Addresses https://github.com/matrix-org/synapse-dinsic/issues/70 This PR causes `ProxyAgent` to attempt to extract credentials from an `HTTPS_PROXY` env var. If credentials are found, a `Proxy-Authorization` header ([details](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authorization)) is sent to the proxy server to authenticate against it. The headers are *not* passed to the remote server. Also added some type hints.
-
- Mar 11, 2021
-
-
Patrick Cloke authored
-
- Mar 01, 2021
-
-
Patrick Cloke authored
By consuming the response if the headers imply that the content is too large.
-
- Feb 26, 2021
-
-
Tim Leung authored
### Changes proposed in this PR - Add support for the `no_proxy` and `NO_PROXY` environment variables - Internally rely on urllib's [`proxy_bypass_environment`](https://github.com/python/cpython/blob/bdb941be423bde8b02a5695ccf51c303d6204bed/Lib/urllib/request.py#L2519) - Extract env variables using urllib's `getproxies`/[`getproxies_environment`](https://github.com/python/cpython/blob/bdb941be423bde8b02a5695ccf51c303d6204bed/Lib/urllib/request.py#L2488 ) which supports lowercase + uppercase, preferring lowercase, except for `HTTP_PROXY` in a CGI environment This does contain behaviour changes for consumers so making sure these are called out: - `no_proxy`/`NO_PROXY` is now respected - lowercase `https_proxy` is now allowed and taken over `HTTPS_PROXY` Related to #9306 which also uses `ProxyAgent` Signed-off-by:
Timothy Leung <tim95@hotmail.co.uk>
-
- Feb 18, 2021
-
-
Patrick Cloke authored
This reduces the memory usage of previewing media files which end up larger than the `max_spider_size` by avoiding buffering content internally in treq. It also checks the `Content-Length` header in additional places instead of streaming the content to check the body length.
-
- Feb 16, 2021
-
-
Eric Eastwood authored
- Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
-
- Jan 20, 2021
-
-
Richard van der Hoff authored
-
- Jan 15, 2021
-
-
Patrick Cloke authored
Previously this code generated unreferenced `Deferred` instances which caused "Unhandled Deferreds" errors to appear in error situations.
-
- Jan 12, 2021
-
-
Marcus authored
It is expected that the proxy would be on a private IP address so the configured proxy should be connected to regardless of the IP range blacklist.
-
Patrick Cloke authored
-
- Dec 16, 2020
-
-
Patrick Cloke authored
-
- Dec 15, 2020
-
-
Richard van der Hoff authored
This was never used, so let's get rid of it.
-
Richard van der Hoff authored
The two are equivalent, but really we want to check the HTTP result that got returned to the channel, not the code that the Request object *intended* to return to the channel.
-
- Dec 02, 2020
-
-
Patrick Cloke authored
Replaces the `federation_ip_range_blacklist` configuration setting with an `ip_range_blacklist` setting with wider scope. It now applies to: * Federation * Identity servers * Push notifications * Checking key validitity for third-party invite events The old `federation_ip_range_blacklist` setting is still honored if present, but with reduced scope (it only applies to federation and identity servers).
-
- 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.
-