Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Be more lenient when parsing the version for oEmbed responses. (#11065) | Patrick Cloke | 2021-10-13 | 1 | -0/+51 |
| | |||||
* | Add tests for `MediaFilePaths` (#11057) | Sean Quah | 2021-10-12 | 1 | -0/+238 |
| | |||||
* | Autodiscover oEmbed endpoint from returned HTML (#10822) | Patrick Cloke | 2021-10-08 | 1 | -1/+99 |
| | | | | | Searches the returned HTML for an oEmbed endpoint using the autodiscovery mechanism (`<link rel=...>`), and will request it to generate the preview. | ||||
* | Fix empty `url_cache_thumbnails/yyyy-mm-dd/` directories being left behind ↵ | Sean Quah | 2021-09-29 | 1 | -0/+31 |
| | | | | (#10924) | ||||
* | Avoid storing URL cache files in storage providers (#10911) | Sean Quah | 2021-09-27 | 1 | -0/+130 |
| | | | | | URL cache files are short-lived and it does not make sense to offload them (eg. to the cloud) or back them up. | ||||
* | Use direct references for configuration variables (part 5). (#10897) | Patrick Cloke | 2021-09-24 | 1 | -1/+1 |
| | |||||
* | Add reactor to `SynapseRequest` and fix up types. (#10868) | Erik Johnston | 2021-09-24 | 1 | -4/+4 |
| | |||||
* | Include more information in oEmbed previews. (#10819) | Patrick Cloke | 2021-09-22 | 1 | -9/+21 |
| | | | | | | | * Improved titles (fall back to the author name if there's not title) and include the site name. * Handle photo/video payloads. * Include the original URL in the Open Graph response. * Fix the expiration time (by properly converting from seconds to milliseconds). | ||||
* | Refactor oEmbed previews (#10814) | Patrick Cloke | 2021-09-21 | 1 | -13/+13 |
| | | | | | | | | | | | | | The major change is moving the decision of whether to use oEmbed further up the call-stack. This reverts the _download_url method to being a "dumb" functionwhich takes a single URL and downloads it (as it was before #7920). This also makes more minor refactorings: * Renames internal variables for clarity. * Factors out shared code between the HTML and rich oEmbed previews. * Fixes tests to preview an oEmbed image. | ||||
* | Create a constant for a small png image in tests. (#10834) | Patrick Cloke | 2021-09-16 | 1 | -14/+4 |
| | | | To avoid duplicating it between a few tests. | ||||
* | Request JSON for oEmbed requests (and ignore XML only providers). (#10759) | Patrick Cloke | 2021-09-08 | 1 | -1/+54 |
| | | | | | | | | This adds the format to the request arguments / URL to ensure that JSON data is returned (which is all that Synapse supports). This also adds additional error checking / filtering to the configuration file to ignore XML-only providers. | ||||
* | Allow configuration of the oEmbed URLs. (#10714) | Patrick Cloke | 2021-08-31 | 1 | -110/+102 |
| | | | | | This adds configuration options (under an `oembed` section) to configure which URLs are matched to use oEmbed for URL previews. | ||||
* | Fix error when selecting between thumbnails with the same quality (#10684) | Sean | 2021-08-25 | 1 | -1/+38 |
| | | | Fixes #10318 | ||||
* | Flatten the synapse.rest.client package (#10600) | reivilibre | 2021-08-17 | 1 | -1/+1 |
| | |||||
* | [pyupgrade] `tests/` (#10347) | Jonathan de Jong | 2021-07-13 | 1 | -1/+1 |
| | |||||
* | Standardise the module interface (#10062) | Brendan Abolivier | 2021-06-18 | 1 | -0/+3 |
| | | | This PR adds a common configuration section for all modules (see docs). These modules are then loaded at startup by the homeserver. Modules register their hooks and web resources using the new `register_[...]_callbacks` and `register_web_resource` methods of the module API. | ||||
* | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 5 | -5/+0 |
| | | | | | | | 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>` | ||||
* | Use mock from the stdlib. (#9772) | Patrick Cloke | 2021-04-09 | 2 | -4/+2 |
| | |||||
* | Handle image transparency better when thumbnailing. (#9473) | Patrick Cloke | 2021-03-09 | 1 | -8/+21 |
| | | | | Properly uses RGBA mode for 1- and 8-bit images with transparency (instead of RBG mode). | ||||
* | Add test | Erik Johnston | 2021-02-19 | 1 | -3/+66 |
| | |||||
* | Update black, and run auto formatting over the codebase (#9381) | Eric Eastwood | 2021-02-16 | 1 | -3/+11 |
| | | | | | | | - 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 | ||||
* | Add check_media_file_for_spam spam checker hook | Erik Johnston | 2021-02-04 | 1 | -0/+94 |
| | |||||
* | Return a 404 if no valid thumbnail is found. (#9163) | Patrick Cloke | 2021-01-21 | 1 | -1/+24 |
| | | | | | | If no thumbnail of the requested type exists, return a 404 instead of erroring. This doesn't quite match the spec (which does not define what happens if no thumbnail can be found), but is consistent with what Synapse already does. | ||||
* | Skip unit tests which require optional dependencies (#9031) | Richard van der Hoff | 2021-01-07 | 1 | -0/+7 |
| | | | If we are lacking an optional dependency, skip the tests that rely on it. | ||||
* | Remove spurious "SynapseRequest" result from `make_request" | Richard van der Hoff | 2020-12-15 | 2 | -21/+21 |
| | | | | This was never used, so let's get rid of it. | ||||
* | Add X-Robots-Tag header to stop crawlers from indexing media (#8887) | Aaron Raimist | 2020-12-08 | 1 | -0/+13 |
| | | | | | | | Fixes / related to: https://github.com/matrix-org/synapse/issues/6533 This should do essentially the same thing as a robots.txt file telling robots to not index the media repo. https://developers.google.com/search/reference/robots_meta_tag Signed-off-by: Aaron Raimist <aaron@raim.ist> | ||||
* | remove unused FakeResponse (#8864) | Richard van der Hoff | 2020-12-02 | 1 | -26/+0 |
| | |||||
* | Apply an IP range blacklist to push and key revocation requests. (#8821) | Patrick Cloke | 2020-12-02 | 1 | -1/+1 |
| | | | | | | | | | | | | 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). | ||||
* | Make `make_request` actually render the request | Richard van der Hoff | 2020-11-16 | 2 | -40/+33 |
| | | | | | | remove the stubbing out of `request.process`, so that `requestReceived` also renders the request via the appropriate resource. Replace render() with a stub for now. | ||||
* | Fix the URL in the URL preview tests | Richard van der Hoff | 2020-11-16 | 1 | -19/+22 |
| | | | | the preview resource is mointed at preview_url, not url_preview | ||||
* | use global make_request() directly where we have a custom Resource | Richard van der Hoff | 2020-11-15 | 1 | -3/+14 |
| | | | | | | 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`. | ||||
* | Do not error when thumbnailing invalid files (#8236) | Patrick Cloke | 2020-09-09 | 1 | -10/+29 |
| | | | | If a file cannot be thumbnailed for some reason (e.g. the file is empty), then catch the exception and convert it to a reasonable error message for the client. | ||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 1 | -3/+3 |
| | |||||
* | Support oEmbed for media previews. (#7920) | Patrick Cloke | 2020-07-27 | 1 | -8/+134 |
| | | | Fixes previews of Twitter URLs by using their oEmbed endpoint to grab content. | ||||
* | Convert more of the media code to async/await (#7873) | Patrick Cloke | 2020-07-24 | 1 | -1/+4 |
| | |||||
* | isort 5 compatibility (#7786) | Will Hunt | 2020-07-05 | 1 | -3/+1 |
| | | | The CI appears to use the latest version of isort, which is a problem when isort gets a major version bump. Rather than try to pin the version, I've done the necessary to make isort5 happy with synapse. | ||||
* | Fetch from the r0 media path instead of the unspecced v1. (#7714) | Patrick Cloke | 2020-06-17 | 1 | -1/+1 |
| | |||||
* | Replace all remaining six usage with native Python 3 equivalents (#7704) | Dagfinn Ilmari Mannsåker | 2020-06-16 | 1 | -1/+1 |
| | |||||
* | Add support for webp thumbnailing (#7586) | WGH | 2020-06-05 | 1 | -36/+99 |
| | | | | | Closes #4382 Signed-off-by: Maxim Plotnikov <wgh@torlan.ru> | ||||
* | Allow specifying the value of Accept-Language header for URL previews (#7265) | Andrew Morgan | 2020-04-15 | 1 | -0/+55 |
| | |||||
* | Lint + changelog | Brendan Abolivier | 2020-01-22 | 1 | -3/+1 |
| | |||||
* | Remove unused import | Brendan Abolivier | 2020-01-22 | 1 | -1/+1 |
| | |||||
* | Add tests for thumbnailing | Brendan Abolivier | 2020-01-22 | 1 | -3/+45 |
| | |||||
* | Apply suggestions from code review | Richard van der Hoff | 2019-11-05 | 1 | -0/+1 |
| | | | | Co-Authored-By: Brendan Abolivier <babolivier@matrix.org> Co-Authored-By: Erik Johnston <erik@matrix.org> | ||||
* | Strip overlong OpenGraph data from url preview | Richard van der Hoff | 2019-11-05 | 1 | -0/+34 |
| | | | | ... to stop people causing DoSes with malicious web pages | ||||
* | Move logging utilities out of the side drawer of util/ and into logging/ (#5606) | Amber Brown | 2019-07-04 | 1 | -1/+1 |
| | |||||
* | Fix media repo breaking (#5593) | Amber Brown | 2019-07-02 | 1 | -0/+12 |
| | |||||
* | Make the http server handle coroutine-making REST servlets (#5475) | Amber Brown | 2019-06-29 | 1 | -10/+15 |
| | |||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 3 | -38/+38 |
| | |||||
* | Migrate all tests to use the dict-based config format instead of hanging ↵ | Amber Brown | 2019-05-13 | 2 | -35/+22 |
| | | | | items off HomeserverConfig (#5171) | ||||
* | URL preview blacklisting fixes (#5155) | Andrew Morgan | 2019-05-10 | 1 | -11/+11 |
| | | | Prevents a SynapseError being raised inside of a IResolutionReceiver and instead opts to just return 0 results. This thus means that we have to lump a failed lookup and a blacklisted lookup together with the same error message, but the substitute should be generic enough to cover both cases. | ||||
* | Run Black on the tests again (#5170) | Amber Brown | 2019-05-10 | 1 | -10/+4 |
| | |||||
* | Fix parsing of Content-Disposition headers (#4763) | Richard van der Hoff | 2019-02-27 | 1 | -0/+45 |
| | | | | | | | | | | | * Fix parsing of Content-Disposition headers TIL: filenames in content-dispostion headers can contain semicolons, and aren't %-encoded. * fix python2 incompatibility * Fix docstrings | ||||
* | Fix IP URL previews on Python 3 (#4215) | Amber Brown | 2018-12-22 | 1 | -98/+326 |
| | |||||
* | Fix more logcontext leaks in tests (#4209) | Richard van der Hoff | 2018-11-27 | 1 | -1/+2 |
| | |||||
* | Fix logcontext leak in test_url_preview | Richard van der Hoff | 2018-11-19 | 1 | -1/+2 |
| | |||||
* | Fix Content-Disposition in media repository (#4176) | Amber Brown | 2018-11-15 | 1 | -0/+145 |
| | |||||
* | Use <meta> tags to discover the per-page encoding of html previews (#4183) | Amber Brown | 2018-11-15 | 1 | -0/+77 |
| | |||||
* | Fix URL preview bugs (type error when loading cache from db, content-type ↵ | Amber Brown | 2018-11-08 | 1 | -0/+164 |
| | | | | including quotes) (#4157) | ||||
* | Run black. | black | 2018-08-10 | 1 | -4/+2 |
| | |||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -7/+7 |
| | |||||
* | Pass around the reactor explicitly (#3385) | Amber Brown | 2018-06-22 | 1 | -2/+3 |
| | |||||
* | Fix broken unit test for media storage | Erik Johnston | 2018-02-05 | 1 | -1/+6 |
| | |||||
* | Add unit tests | Erik Johnston | 2018-01-18 | 3 | -0/+109 |