summary refs log tree commit diff
path: root/tests/rest/client (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add knock information in admin exported data (#11171)Rafael Gonçalves2021-10-281-0/+29
| | | Signed-off-by: Rafael Goncalves <rafaelgoncalves@riseup.net>
* Implement an `on_new_event` callback (#11126)Brendan Abolivier2021-10-261-3/+90
| | | Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
* Add a thread relation type per MSC3440. (#11088)Patrick Cloke2021-10-211-6/+34
| | | | Adds experimental support for MSC3440's `io.element.thread` relation type (and the aggregation for it).
* Fix-up some type hints in the relations tests. (#11076)Patrick Cloke2021-10-141-28/+27
|
* Add a test for a workaround concerning the behaviour of third-party rule ↵reivilibre2021-10-141-6/+50
| | | | modules and `SynapseError`s. (#11071)
* Add a spamchecker method to allow or deny 3pid invites (#10894)Brendan Abolivier2021-10-061-0/+70
| | | | | This is in the context of creating new module callbacks that modules in https://github.com/matrix-org/synapse-dinsic can use, in an effort to reconcile the spam checker API in synapse-dinsic with the one in mainline. Note that a module callback already exists for 3pid invites (https://matrix-org.github.io/synapse/develop/modules/third_party_rules_callbacks.html#check_threepid_can_be_invited) but it doesn't check whether the sender of the invite is allowed to send it.
* Add a spamchecker callback to allow or deny room joins (#10910)Brendan Abolivier2021-10-061-0/+101
| | | Co-authored-by: Erik Johnston <erik@matrix.org>
* Make is_public Optional[bool] for create_room_as test util (#10951) (#10963)AndrewFerr2021-10-041-6/+7
| | | Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net>
* Consistently exclude from user_directory (#10960)David Robertson2021-10-041-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Introduce `should_include_local_users_in_dir` We exclude three kinds of local users from the user_directory tables. At present we don't consistently exclude all three in the same places. This commit introduces a new function to gather those exclusion conditions together. Because we have to handle local and remote users in different ways, I've made that function only consider the case of remote users. It's the caller's responsibility to make the local versus remote distinction clear and correct. A test fixup is required. The test now hits a path which makes db queries against the users table. The expected rows were missing, because we were using a dummy user that hadn't actually been registered. We also add new test cases to covert the exclusion logic. ---- By my reading this makes these changes: * When an app service user registers or changes their profile, they will _not_ be added to the user directory. (Previously only support and deactivated users were excluded). This is consistent with the logic that rebuilds the user directory. See also [the discussion here](https://github.com/matrix-org/synapse/pull/10914#discussion_r716859548). * When rebuilding the directory, exclude support and disabled users from room sharing tables. Previously only appservice users were excluded. * Exclude all three categories of local users when rebuilding the directory. Previously `_populate_user_directory_process_users` didn't do any exclusion. Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Use direct references for configuration variables (part 7). (#10959)Patrick Cloke2021-10-043-5/+5
|
* type-hint `HomeserverTestcase.setup_test_homeserver` (#10961)David Robertson2021-10-011-3/+3
| | | | | * type-hint `HomeserverTestcase.setup_test_homeserver` For better IDE completion. A small drive-by.
* Use direct references for configuration variables (part 6). (#10916)Patrick Cloke2021-09-294-5/+5
|
* Implement MSC3069: Guest support on whoami (#9655)Travis Ralston2021-09-291-5/+44
|
* Add a spamchecker callback to allow or deny room creation based on invites ↵Brendan Abolivier2021-09-241-2/+117
| | | | | | | (#10898) This is in the context of creating new module callbacks that modules in https://github.com/matrix-org/synapse-dinsic can use, in an effort to reconcile the spam checker API in synapse-dinsic with the one in mainline. This adds a callback that's fairly similar to user_may_create_room except it also allows processing based on the invites sent at room creation.
* Add reactor to `SynapseRequest` and fix up types. (#10868)Erik Johnston2021-09-243-7/+11
|
* Use direct references for configuration variables (part 4). (#10893)Patrick Cloke2021-09-232-7/+7
|
* Use direct references for some configuration variables (part 3) (#10885)Patrick Cloke2021-09-231-1/+1
| | | | | | | | This avoids the overhead of searching through the various configuration classes by directly referencing the class that the attributes are in. It also improves type hints since mypy can now resolve the types of the configuration variables.
* Add type hints for event streams. (#10856)Patrick Cloke2021-09-212-4/+16
|
* Test that state events sent by modules correctly end up in the room's state ↵Brendan Abolivier2021-09-211-0/+84
| | | | | | | (#10835) Test for #10830 Ideally the test would also make sure the new state event comes down sync, but this is probably good enough.
* Always add local users to the user directory (#10796)David Robertson2021-09-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | | It's a simplification, but one that'll help make the user directory logic easier to follow with the other changes upcoming. It's not strictly required for those changes, but this will help simplify the resulting logic that listens for `m.room.member` events and generally make the logic easier to follow. This means the config option `search_all_users` ends up controlling the search query only, and not the data we store. The cost of doing so is an extra row in the `user_directory` and `user_directory_search` tables for each local user which - belongs to no public rooms - belongs to no private rooms of size ≥ 2 I think the cost of this will be marginal (since they'll already have entries in `users` and `profiles` anyway). As a small upside, a homeserver whose directory was built with this change can toggle `search_all_users` without having to rebuild their directory. Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Allow sending a membership event to unban a user (#10807)Aaron Raimist2021-09-212-1/+97
| | | | | * Allow membership event to unban user Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Handle room upgrades for spaces (#10774)Patrick Cloke2021-09-101-4/+63
| | | | | By copying the `room_type` field of the create event and migrating any non-empty `m.space.child` events to the new room that is created.
* Remove unstable MSC2858 API, including `experimental.msc2858_enabled` config ↵Sean2021-09-091-58/+7
| | | | | option (#10693) Signed-off-by: Sean Quah <seanq@element.io>
* Merge branch 'master' into developRichard van der Hoff2021-08-312-1/+139
|\
| * Fix up unit tests (#10723)Richard van der Hoff2021-08-311-2/+15
| | | | | | These were broken in an incorrect merge of GHSA-jj53-8fmw-f2w2 (cb35df9)
| * Merge pull request from GHSA-jj53-8fmw-f2w2reivilibre2021-08-311-0/+43
| |
| * Merge pull request from GHSA-3x4c-pq33-4w3qreivilibre2021-08-311-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add some tests to characterise the problem Some failing. Current states: RoomsMemberListTestCase test_get_member_list ... [OK] test_get_member_list_mixed_memberships ... [OK] test_get_member_list_no_permission ... [OK] test_get_member_list_no_permission_former_member ... [OK] test_get_member_list_no_permission_former_member_with_at_token ... [FAIL] test_get_member_list_no_room ... [OK] test_get_member_list_no_permission_with_at_token ... [FAIL] * Correct the tests * Check user is/was member before divulging room membership * Pull out only the 1 membership event we want. * Update tests/rest/client/v1/test_rooms.py Co-authored-by: Erik Johnston <erik@matrix.org> * Fixup tests (following apply review suggestion) Co-authored-by: Erik Johnston <erik@matrix.org>
* | Validate new m.room.power_levels events (#10232)Aaron Raimist2021-08-261-0/+78
| | | | | | | | Signed-off-by: Aaron Raimist <aaron@raim.ist>
* | Merge branch 'master' into developErik Johnston2021-08-241-2/+2
|\|
| * Set room version 8 as preferred for restricted rooms. (#10571)Patrick Cloke2021-08-201-2/+2
| |
* | Implement MSC3231: Token authenticated registration (#10142)Callum Brown2021-08-211-0/+434
| | | | | | | | | | Signed-off-by: Callum Brown <callum@calcuode.com> This is part of my GSoC project implementing [MSC3231](https://github.com/matrix-org/matrix-doc/pull/3231).
* | Flatten tests/rest/client/{v1,v2_alpha} too (#10667)David Robertson2021-08-2024-15/+2
| |
* | Follow-up: format changelog, add licence (#10593)David Robertson2021-08-201-0/+14
| | | | | | | | Merged before approval; these comments from @clokep on that PR.
* | Validate device_keys for C-S /keys/query requests (#10593)David Robertson2021-08-201-0/+77
| | | | | | | | | | | | | | | | * Validate device_keys for C-S /keys/query requests Closes #10354 A small, not particularly critical fix. I'm interested in seeing if we can find a more systematic approach though. #8445 is the place for any discussion.
* | Support MSC3283: Expose `enable_set_displayname` in capabilities (#10452)Dirk Klimpel2021-08-191-23/+86
|/
* Flatten the synapse.rest.client package (#10600)reivilibre2021-08-1728-45/+35
|
* Fix type hints in space summary tests. (#10575)Patrick Cloke2021-08-111-3/+3
| | | And ensure that the file is checked via mypy.
* Fix exceptions in logs when failing to get remote room list (#10541)Erik Johnston2021-08-061-1/+91
|
* Add a setting to disable TLS for sending email (#10546)Richard van der Hoff2021-08-062-18/+27
| | | This is mostly useful in case the server offers TLS, but doesn't present a valid certificate.
* Don't fail on empty bodies when sending out read receipts (#10531)Brendan Abolivier2021-08-041-0/+12
| | | | | Fixes a bug introduced in rc1 that would cause Synapse to 400 on read receipts requests with empty bodies. Broken in #10413
* Support for MSC2285 (hidden read receipts) (#10413)Šimon Brandner2021-07-281-2/+95
| | | Implementation of matrix-org/matrix-doc#2285
* Support MSC2033: Device ID on whoami (#9918)Travis Ralston2021-07-271-1/+42
| | | | | | | | | | * Fix no-access-token bug in deactivation tests * Support MSC2033: Device ID on whoami * Test for appservices too MSC: https://github.com/matrix-org/matrix-doc/pull/2033 The MSC has passed FCP, which means stable endpoints can be used.
* MSC3244 room capabilities implementation (#10283)Michael Telatynski2021-07-201-0/+46
|
* Port the ThirdPartyEventRules module interface to the new generic interface ↵Brendan Abolivier2021-07-201-24/+108
| | | | | (#10386) Port the third-party event rules interface to the generic module interface introduced in v1.37.0
* Add a new version of the R30 phone-home metric, which removes a false ↵reivilibre2021-07-191-3/+27
| | | | | impression of retention given by the old R30 metric (#10332) Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
* Use inline type hints in `tests/` (#10350)Jonathan de Jong2021-07-132-10/+8
| | | | | | | | This PR is tantamount to running: python3.8 -m com2ann -v 6 tests/ (com2ann requires python 3.8 to run)
* [pyupgrade] `tests/` (#10347)Jonathan de Jong2021-07-133-9/+9
|
* Do not recurse into non-spaces in the spaces summary. (#10256)Patrick Cloke2021-06-291-1/+2
| | | | | Previously m.child.room events in non-space rooms would be treated as part of the room graph, but this is no longer supported.
* MSC2918 Refresh tokens implementation (#9450)Quentin Gliech2021-06-241-1/+219
| | | | | | | | | | This implements refresh tokens, as defined by MSC2918 This MSC has been implemented client side in Hydrogen Web: vector-im/hydrogen-web#235 The basics of the MSC works: requesting refresh tokens on login, having the access tokens expire, and using the refresh token to get a new one. Signed-off-by: Quentin Gliech <quentingliech@gmail.com>
* Re-introduce "Leave out optional keys from /sync" change (#10214)Andrew Morgan2021-06-231-29/+1
| | | Required some fixes due to merge conflicts with #6739, but nothing too hairy. The first commit is the same as the original (after merge conflict resolution) then two more for compatibility with the latest sync code.
* Ensure that we do not cache empty sync responses after a timeout (#10158)Richard van der Hoff2021-06-171-0/+50
| | | Fixes #8518 by telling the ResponseCache not to cache the /sync response if the next_batch param is the same as the since token.
* update black to 21.6b0 (#10197)Marcus2021-06-174-11/+11
| | | | | Reformat all files with the new version. Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu>
* Remove the experimental flag for knocking and use stable prefixes / ↵Patrick Cloke2021-06-151-4/+4
| | | | | | | endpoints. (#10167) * Room version 7 for knocking. * Stable prefixes and endpoints (both client and federation) for knocking. * Removes the experimental configuration flag.
* Implement knock feature (#6739)Sorunome2021-06-091-2/+93
| | | | | | This PR aims to implement the knock feature as proposed in https://github.com/matrix-org/matrix-doc/pull/2403 Signed-off-by: Sorunome mail@sorunome.de Signed-off-by: Andrew Morgan andrewm@element.io
* r0.6.1 support: /rooms/:roomId/aliases endpoint (#9224)Travis Ralston2021-06-031-2/+1
| | | | | | [MSC2432](https://github.com/matrix-org/matrix-doc/pull/2432) added this endpoint originally but it has since been included in the spec for nearly a year. This is progress towards https://github.com/matrix-org/synapse/issues/8334
* Make reason and score optional for report_event (#10077)Callum Brown2021-05-271-0/+83
| | | | | | Implements MSC2414: https://github.com/matrix-org/matrix-doc/pull/2414 See #8551 Signed-off-by: Callum Brown <callum@calcuode.com>
* Correctly ratelimit invites when creating a room (#9968)Brendan Abolivier2021-05-121-0/+37
| | | | | * Correctly ratelimit invites when creating a room Also allow ratelimiting for more than one action at a time.
* Tests for to-device messages (#9965)Richard van der Hoff2021-05-111-0/+201
|
* Revert "Leave out optional keys from /sync (#9919)" (#9940)Erik Johnston2021-05-061-1/+29
| | | This reverts commit e9eb3549d32a6f93d07de8dbd5e1ebe54c8d8278.
* Leave out optional keys from /sync (#9919)DeepBlueV7.X2021-05-051-29/+1
| | | | | | This leaves out all optional keys from /sync. This should be fine for all clients tested against conduit already, but it may break some clients, as such we should check, that at least most of them don't break horribly and maybe back out some of the individual changes. (We can probably always leave out groups for example, while the others may cause more issues.) Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
* Split presence out of master (#9820)Erik Johnston2021-04-231-2/+3
|
* Limit length of accepted email addresses (#9855)Erik Johnston2021-04-221-0/+51
|
* Fix (final) Bugbear violations (#9838)Jonathan de Jong2021-04-201-3/+3
|
* Port "Allow users to click account renewal links multiple times without ↵Andrew Morgan2021-04-191-15/+37
| | | | | hitting an 'Invalid Token' page #74" from synapse-dinsic (#9832) This attempts to be a direct port of https://github.com/matrix-org/synapse-dinsic/pull/74 to mainline. There was some fiddling required to deal with the changes that have been made to mainline since (mainly dealing with the split of `RegistrationWorkerStore` from `RegistrationStore`, and the changes made to `self.make_request` in test code).
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-1428-28/+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>`
* Require AppserviceRegistrationType (#9548)Will Hunt2021-04-121-4/+27
| | | This change ensures that the appservice registration behaviour follows the spec. We decided to do this for Dendrite, so it made sense to also make a PR for synapse to correct the behaviour.
* Use mock from the stdlib. (#9772)Patrick Cloke2021-04-0910-14/+10
|
* Bugbear: Add Mutable Parameter fixes (#9682)Jonathan de Jong2021-04-083-7/+17
| | | | | | | 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>
* Update mypy configuration: `no_implicit_optional = True` (#9742)Jonathan de Jong2021-04-051-2/+5
|
* Ensure we use a copy of the event content dict before modifying it in ↵Andrew Morgan2021-03-172-0/+124
| | | | | | | | | serialize_event (#9585) This bug was discovered by DINUM. We were modifying `serialized_event["content"]`, which - if you've got `USE_FROZEN_DICTS` turned on or are [using a third party rules module](https://github.com/matrix-org/synapse/blob/17cd48fe5171d50da4cb59db647b993168e7dfab/synapse/events/third_party_rules.py#L73-L76) - will raise a 500 if you try to a edit a reply to a message. `serialized_event["content"]` could be set to the edit event's content, instead of a copy of it, which is bad as we attempt to modify it. Instead, we also end up modifying the original event's content. DINUM uses a third party rules module, which meant the event's content got frozen and thus an exception was raised. To be clear, the problem is not that the event's content was frozen. In fact doing so helped us uncover the fact we weren't copying event content correctly.
* Return m.change_password.enabled=false if local database is disabled (#9588)Dirk Klimpel2021-03-161-4/+32
| | | | | Instead of if the user does not have a password hash. This allows a SSO user to add a password to their account, but only if the local password database is configured.
* Add support for stable MSC2858 API (#9617)Richard van der Hoff2021-03-161-16/+27
| | | | | The stable format uses different brand identifiers, so we need to support two identifiers for each IdP.
* Fix additional type hints from Twisted upgrade. (#9518)Patrick Cloke2021-03-031-11/+24
|
* SSO: redirect to public URL before setting cookies (#9436)Richard van der Hoff2021-02-263-26/+60
| | | ... otherwise, we don't get the cookie back.
* Remove cache for get_shared_rooms_for_users (#9416)Andrew Morgan2021-02-221-34/+41
| | | | | | | This PR remove the cache for the `get_shared_rooms_for_users` storage method (the db method driving the experimental "what rooms do I share with this user?" feature: [MSC2666](https://github.com/matrix-org/matrix-doc/pull/2666)). Currently subsequent requests to the endpoint will return the same result, even if your shared rooms with that user have changed. The cache was added in https://github.com/matrix-org/synapse/pull/7785, but we forgot to ensure it was invalidated appropriately. Upon attempting to invalidate it, I found that the cache had to be entirely invalidated whenever a user (remote or local) joined or left a room. This didn't make for a very useful cache, especially for a function that may or may not be called very often. Thus, I've opted to remove it instead of invalidating it.
* Parse ui_auth.session_timeout as a duration (instead of treating it as ms) ↵Rishabh Arya2021-02-181-1/+1
| | | | (#9426)
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-1615-97/+187
| | | | | | | - 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
* Handle missing data in power levels events during room upgrade. (#9395)Patrick Cloke2021-02-161-0/+153
|
* Convert additional test-cases to homeserver test case. (#9396)Patrick Cloke2021-02-161-158/+91
| | | And convert some inlineDeferreds to async-friendly functions.
* Merge tag 'v1.27.0rc2' into developPatrick Cloke2021-02-111-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.27.0rc2 (2021-02-11) ============================== Features -------- - Further improvements to the user experience of registration via single sign-on. ([\#9297](https://github.com/matrix-org/synapse/issues/9297)) Bugfixes -------- - Fix ratelimiting introduced in v1.27.0rc1 for invites to respect the `ratelimit` flag on application services. ([\#9302](https://github.com/matrix-org/synapse/issues/9302)) - Do not automatically calculate `public_baseurl` since it can be wrong in some situations. Reverts behaviour introduced in v1.26.0. ([\#9313](https://github.com/matrix-org/synapse/issues/9313)) Improved Documentation ---------------------- - Clarify the sample configuration for changes made to the template loading code. ([\#9310](https://github.com/matrix-org/synapse/issues/9310))
| * Backout changes for automatically calculating the public baseurl. (#9313)Patrick Cloke2021-02-111-1/+3
| | | | | | | | This breaks some people's configurations (if their Client-Server API is not accessed via port 443).
* | Convert some test cases to use HomeserverTestCase. (#9377)Patrick Cloke2021-02-111-28/+0
| | | | | | | | This has the side-effect of being able to remove use of `inlineCallbacks` in the test-cases for cleaner tracebacks.
* | Social login UI polish (#9301)Richard van der Hoff2021-02-031-4/+12
|/
* Merge branch 'social_login' into developRichard van der Hoff2021-02-012-18/+18
|\
| * Replace username picker with a template (#9275)Richard van der Hoff2021-02-011-3/+2
| | | | | | | | | | There's some prelimiary work here to pull out the construction of a jinja environment to a separate function. I wanted to load the template at display time rather than load time, so that it's easy to update on the fly. Honestly, I think we should do this with all our templates: the risk of ending up with malformed templates is far outweighed by the improved turnaround time for an admin trying to update them.
| * Fix SSO on workers (#9271)Richard van der Hoff2021-02-012-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #8966. * Factor out build_synapse_client_resource_tree Start a function which will mount resources common to all workers. * Move sso init into build_synapse_client_resource_tree ... so that we don't have to do it for each worker * Fix SSO-login-via-a-worker Expose the SSO login endpoints on workers, like the documentation says. * Update workers config for new endpoints Add documentation for endpoints recently added (#8942, #9017, #9262) * remove submit_token from workers endpoints list this *doesn't* work on workers (yet). * changelog * Add a comment about the odd path for SAML2Resource
| * Split out a separate endpoint to complete SSO registration (#9262)Richard van der Hoff2021-02-011-1/+13
| | | | | | There are going to be a couple of paths to get to the final step of SSO reg, and I want the URL in the browser to consistent. So, let's move the final step onto a separate path, which we redirect to.
* | Ratelimit invites by room and target user (#9258)Erik Johnston2021-01-291-0/+35
| |
* | Ratelimit 3PID /requestToken API (#9238)Erik Johnston2021-01-281-6/+84
| |
* | Merge branch 'social_login' into developRichard van der Hoff2021-01-271-0/+92
|\|
| * Implement MSC2858 support (#9183)Richard van der Hoff2021-01-271-0/+92
| | | | | | Fixes #8928.
* | Add an admin API for shadow-banning users. (#9209)Patrick Cloke2021-01-251-6/+2
|/ | | | | | | | | | This expands the current shadow-banning feature to be usable via the admin API and adds documentation for it. A shadow-banned users receives successful responses to their client-server API requests, but the events are not propagated into rooms. Shadow-banning a user should be used as a tool of last resort and may lead to confusing or broken behaviour for the client.
* Prefix idp_id with "oidc-" (#9189)Richard van der Hoff2021-01-211-1/+1
| | | ... to avoid clashes with other SSO mechanisms
* Fix bugs in handling clientRedirectUrl, and improve OIDC tests (#9127, #9128)Richard van der Hoff2021-01-182-81/+127
| | | | | | | | | | | | | | | | * Factor out a common TestHtmlParser Looks like I'm doing this in a few different places. * Improve OIDC login test Complete the OIDC login flow, rather than giving up halfway through. * Ensure that OIDC login works with multiple OIDC providers * Fix bugs in handling clientRedirectUrl - don't drop duplicate query-params, or params with no value - allow utf-8 in query-params
* Fix test failure due to bad mergeRichard van der Hoff2021-01-151-1/+3
| | | | | | | 0dd2649c1 (#9112) changed the signature of `auth_via_oidc`. Meanwhile, 26d10331e (#9091) introduced a new test which relied on the old signature of `auth_via_oidc`. The two branches were never tested together until they landed in develop.
* Improve UsernamePickerTestCase (#9112)Richard van der Hoff2021-01-153-7/+111
| | | | | * make the OIDC bits of the test work at a higher level - via the REST api instead of poking the OIDCHandler directly. * Move it to test_login.py, where I think it fits better.
* Add a test for wrong user returned by SSORichard van der Hoff2021-01-131-0/+27
|
* Add a test for UI-Auth-via-SSO (#9082)Richard van der Hoff2021-01-132-37/+199
| | | | | * Add complete test for UI-Auth-via-SSO. * review comments
* Remove user's avatar URL and displayname when deactivated. (#8932)Dirk Klimpel2021-01-122-3/+8
| | | This only applies if the user's data is to be erased.
* Add some tests for the IDP picker flowRichard van der Hoff2021-01-072-3/+191
|
* Fix type hints in test_login.pyRichard van der Hoff2021-01-071-24/+54
|
* black-format tests/rest/client/v1/test_login.pyRichard van der Hoff2021-01-071-11/+6
| | | | | black seems to want to reformat this, despite `black --check` being happy with it :/
* Skip unit tests which require optional dependencies (#9031)Richard van der Hoff2021-01-072-11/+26
| | | If we are lacking an optional dependency, skip the tests that rely on it.
* Combine the SSO Redirect Servlets (#9015)Richard van der Hoff2021-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement CasHandler.handle_redirect_request ... to make it match OidcHandler and SamlHandler * Clean up interface for OidcHandler.handle_redirect_request Make it accept `client_redirect_url=None`. * Clean up interface for `SamlHandler.handle_redirect_request` ... bring it into line with CAS and OIDC by making it take a Request parameter, move the magic for `client_redirect_url` for UIA into the handler, and fix the return type to be a `str` rather than a `bytes`. * Define a common protocol for SSO auth provider impls * Give SsoIdentityProvider an ID and register them * Combine the SSO Redirect servlets Now that the SsoHandler knows about the identity providers, we can combine the various *RedirectServlets into a single implementation which delegates to the right IdP. * changelog
* Support PyJWT v2.0.0. (#8986)Patrick Cloke2020-12-221-4/+12
| | | | Tests were broken due to an API changing. The code used in Synapse proper should be compatible with both versions already.
* Allow re-using a UI auth validation for a period of time (#8970)Patrick Cloke2020-12-181-31/+63
|
* Merge pull request #8951 from matrix-org/rav/username_picker_2Richard van der Hoff2020-12-161-1/+1
|\ | | | | More preparatory refactoring of the OidcHandler tests
| * Test `get_extra_attributes` fallbackRichard van der Hoff2020-12-151-1/+1
| | | | | | | | | | despite the warnings saying "don't implement get_extra_attributes", we had implemented it, so the tests weren't doing what we thought they were.
* | lintRichard van der Hoff2020-12-152-2/+1
| |
* | Remove spurious "SynapseRequest" result from `make_request"Richard van der Hoff2020-12-1525-396/+335
| | | | | | | | This was never used, so let's get rid of it.
* | Remove redundant reading of SynapseRequest.argsRichard van der Hoff2020-12-151-9/+1
| | | | | | | | this didn't seem to be doing a lot, so remove it.
* | remove 'response' result from `_get_shared_rooms`Richard van der Hoff2020-12-151-8/+9
| |
* | Replace `request.code` with `channel.code`Richard van der Hoff2020-12-153-8/+8
|/ | | | | | 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.
* Don't ratelimit autojoining of rooms (#8921)Erik Johnston2020-12-111-0/+16
| | | Fixes #8866
* Fix errorcode for disabled registration (#8867)Richard van der Hoff2020-12-031-0/+1
| | | | The spec says we should return `M_FORBIDDEN` when someone tries to register and registration is disabled.
* Merge pull request #8858 from matrix-org/rav/sso_uiaRichard van der Hoff2020-12-022-18/+192
|\ | | | | UIA: offer only available auth flows
| * UIA: offer only available auth flowsRichard van der Hoff2020-12-022-18/+192
| | | | | | | | | | | | | | During user-interactive auth, do not offer password auth to users with no password, nor SSO auth to users with no SSO. Fixes #7559.
* | Apply an IP range blacklist to push and key revocation requests. (#8821)Patrick Cloke2020-12-024-4/+4
|/ | | | | | | | | | | | 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).
* Allow specifying room version in 'RestHelper.create_room_as' and add typing ↵Andrew Morgan2020-12-021-2/+25
| | | | | (#8854) This PR adds a `room_version` argument to the `RestHelper`'s `create_room_as` function for tests. I plan to use this for testing knocking, which currently uses an unstable room version.
* Support "identifier" dicts in UIA (#8848)Richard van der Hoff2020-12-011-8/+25
| | | | | | | | | | The spec requires synapse to support `identifier` dicts for `m.login.password` user-interactive auth, which it did not (instead, it required an undocumented `user` parameter.) To fix this properly, we need to pull the code that interprets `identifier` into `AuthHandler.validate_login` so that it can be called from the UIA code. Fixes #5665.
* Simplify the way the `HomeServer` object caches its internal attributes. ↵Jonathan de Jong2020-11-302-9/+12
| | | | | (#8565) Changes `@cache_in_self` to use underscore-prefixed attributes.
* Remove deprecated `/_matrix/client/*/admin` endpoints (#8785)Dirk Klimpel2020-11-251-3/+3
| | | These are now only available via `/_synapse/admin/v1`.
* Remove redundant `HomeserverTestCase.render`Richard van der Hoff2020-11-1623-318/+0
|
* Remove redundant calls to `render()`Richard van der Hoff2020-11-163-20/+8
|
* Make `make_request` actually render the requestRichard van der Hoff2020-11-162-7/+1
| | | | | | 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.
* Merge branch 'develop' into rav/pass_site_to_make_requestRichard van der Hoff2020-11-161-3/+1
|\
| * Add a `custom_headers` param to `make_request` (#8760)Richard van der Hoff2020-11-161-4/+6
| | | | | | | | Some tests want to set some custom HTTP request headers, so provide a way to do that before calling requestReceived().
* | use global make_request() directly where we have a custom ResourceRichard van der Hoff2020-11-152-9/+33
| | | | | | | | | | | | 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`.
* | pass a Site into make_requestRichard van der Hoff2020-11-151-6/+25
| |
* | pass a Site into RestHelperRichard van der Hoff2020-11-151-5/+6
|/
* Add ability for access tokens to belong to one user but grant access to ↵Erik Johnston2020-10-291-0/+1
| | | | | | | | | | another user. (#8616) We do it this way round so that only the "owner" can delete the access token (i.e. `/logout/all` by the "owner" also deletes that token, but `/logout/all` by the "target user" doesn't). A future PR will add an API for creating such a token. When the target user and authenticated entity are different the `Processed request` log line will be logged with a: `{@admin:server as @bob:server} ...`. I'm not convinced by that format (especially since it adds spaces in there, making it harder to use `cut -d ' '` to chop off the start of log lines). Suggestions welcome.
* Remove some extraneous @unittest.INFOs on unit tests (#8592)Andrew Morgan2020-10-202-2/+0
|
* guard against accidental modificationRichard van der Hoff2020-10-131-0/+20
|
* Allow ThirdPartyRules modules to replace event contentRichard van der Hoff2020-10-131-4/+4
| | | | Support returning a new event dict from `check_event_allowed`.
* Fix message duplication if something goes wrong after persisting the event ↵Erik Johnston2020-10-131-1/+1
| | | | | (#8476) Should fix #3365.
* Allow modules to create and send events into rooms (#8479)Andrew Morgan2020-10-091-1/+27
| | | | | This PR allows Synapse modules making use of the `ModuleApi` to create and send non-membership events into a room. This can useful to have modules send messages, or change power levels in a room etc. Note that they must send event through a user that's already in the room. The non-membership event limitation is currently arbitrary, as it's another chunk of work and not necessary at the moment.
* Remove the deprecated Handlers object (#8494)Patrick Cloke2020-10-094-4/+8
| | | All handlers now available via get_*_handler() methods on the HomeServer.
* Additional tests for third-party event rules (#8468)Richard van der Hoff2020-10-061-13/+71
| | | | | | | | | * Optimise and test state fetching for 3p event rules Getting all the events at once is much more efficient than getting them individually * Test that 3p event rules can modify events
* Merge pull request #8467 from matrix-org/rav/fix_3pevent_rulesRichard van der Hoff2020-10-061-1/+1
|\ | | | | Fix third-party event modules for `check_visibility_can_be_modified` check
| * Fix third-party event modules for `check_visibility_can_be_modified` checkRichard van der Hoff2020-10-051-1/+1
| | | | | | | | | | | | PR #8292 tried to maintain backwards compat with modules which don't provide a `check_visibility_can_be_modified` method, but the tests weren't being run, and the check didn't work.
* | Update default room version to 6 (#8461)Richard van der Hoff2020-10-051-1/+10
|/ | | | Per https://github.com/matrix-org/matrix-doc/pull/2788
* Allow ThirdPartyEventRules modules to manipulate public room state (#8292)Andrew Morgan2020-10-051-12/+19
| | | | | This PR allows `ThirdPartyEventRules` modules to view, manipulate and block changes to the state of whether a room is published in the public rooms directory. While the idea of whether a room is in the public rooms list is not kept within an event in the room, `ThirdPartyEventRules` generally deal with controlling which modifications can happen to a room. Public rooms fits within that idea, even if its toggle state isn't controlled through a state event.
* Make token serializing/deserializing async (#8427)Erik Johnston2020-09-301-8/+22
| | | The idea is that in future tokens will encode a mapping of instance to position. However, we don't want to include the full instance name in the string representation, so instead we'll have a mapping between instance name and an immutable integer ID in the DB that we can use instead. We'll then do the lookup when we serialize/deserialize the token (we could alternatively pass around an `Instance` type that includes both the name and ID, but that turns out to be a lot more invasive).
* Various clean ups to room stream tokens. (#8423)Erik Johnston2020-09-291-4/+4
|
* Only assert valid next_link params when provided (#8417)Andrew Morgan2020-09-291-0/+6
| | | | | | | Broken in https://github.com/matrix-org/synapse/pull/8275 and has yet to be put in a release. Fixes https://github.com/matrix-org/synapse/issues/8418. `next_link` is an optional parameter. However, we were checking whether the `next_link` param was valid, even if it wasn't provided. In that case, `next_link` was `None`, which would clearly not be a valid URL. This would prevent password reset and other operations if `next_link` was not provided, and the `next_link_domain_whitelist` config option was set.
* Allow appservice users to /login (#8320)Will Hunt2020-09-181-1/+133
| | | | | Add ability for ASes to /login using the `uk.half-shot.msc2778.login.application_service` login `type`. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Show a confirmation page during user password reset (#8004)Andrew Morgan2020-09-101-1/+28
| | | | | This PR adds a confirmation step to resetting your user password between clicking the link in your email and your password actually being reset. This is to better align our password reset flow with the industry standard of requiring a confirmation from the user after email validation.
* Don't remember `enabled` of deleted push rules and properly return 404 for ↵reivilibre2020-09-091-0/+448
| | | | | | | missing push rules in `.../actions` and `.../enabled` (#7796) Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Add a config option for validating 'next_link' parameters against a domain ↵Andrew Morgan2020-09-081-7/+96
| | | | | | | | | | | whitelist (#8275) This is a config option ported over from DINUM's Sydent: https://github.com/matrix-org/sydent/pull/285 They've switched to validating 3PIDs via Synapse rather than Sydent, and would like to retain this functionality. This original purpose for this change is phishing prevention. This solution could also potentially be replaced by a similar one to https://github.com/matrix-org/synapse/pull/8004, but across all `*/submit_token` endpoint. This option may still be useful to enterprise even with that safeguard in place though, if they want to be absolutely sure that their employees don't follow links to other domains.
* Stop sub-classing object (#8249)Patrick Cloke2020-09-042-2/+2
|
* Re-implement unread counts (again) (#8059)Brendan Abolivier2020-09-021-2/+155
|
* Add /user/{user_id}/shared_rooms/ api (#7785)Will Hunt2020-09-021-0/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add shared_rooms api * Add changelog * Add . * Wrap response in {"rooms": } * linting * Add unstable_features key * Remove options from isort that aren't part of 5.x `-y` and `-rc` are now default behaviour and no longer exist. `dont-skip` is no longer required https://timothycrosley.github.io/isort/CHANGELOG/#500-penny-july-4-2020 * Update imports to make isort happy * Add changelog * Update tox.ini file with correct invocation * fix linting again for isort * Vendor prefix unstable API * Fix to match spec * import Codes * import Codes * Use FORBIDDEN * Update changelog.d/7785.feature Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> * Implement get_shared_rooms_for_users * a comma * trailing whitespace * Handle the easy feedback * Switch to using runInteraction * Add tests * Feedback * Seperate unstable endpoint from v2 * Add upgrade node * a line * Fix style by adding a blank line at EOF. * Update synapse/storage/databases/main/user_directory.py Co-authored-by: Tulir Asokan <tulir@maunium.net> * Update synapse/storage/databases/main/user_directory.py Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> * Update UPGRADE.rst Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> * Fix UPGRADE/CHANGELOG unstable paths unstable unstable unstable Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-authored-by: Tulir Asokan <tulir@maunium.net> Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Tulir Asokan <tulir@maunium.net>
* Do not yield on awaitables in tests. (#8193)Patrick Cloke2020-08-271-2/+6
|
* Remove remaining is_guest argument uses from get_room_data calls (#8181)Andrew Morgan2020-08-261-10/+2
| | | | | | | #8174 removed the `is_guest` parameter from `get_room_data`, at the same time that #8157 was merged using it, colliding together to break unit tests on develop. This PR removes the `is_guest` parameter from the call in the broken test. Uses the same changelog as #8174.
* Do not propagate typing notifications from shadow-banned users. (#8176)Patrick Cloke2020-08-261-0/+48
|
* Remove unused parameter from, and add safeguard in, get_room_data (#8174)Andrew Morgan2020-08-261-1/+1
| | | | | | Small cleanup PR. * Removed the unused `is_guest` argument * Added a safeguard to a (currently) impossible code path, fixing static checking at the same time.
* Do not propagate profile changes of shadow-banned users into rooms. (#8157)Patrick Cloke2020-08-262-157/+274
|
* Fix rate limiting unit tests. (#8167)Patrick Cloke2020-08-261-13/+14
| | | | These were passing on the release-v1.19.1 branch but started failing once merged to develop.
* Merge tag 'v1.19.1rc1' into developBrendan Abolivier2020-08-252-4/+93
|\ | | | | | | | | | | | | | | | | | | | | Synapse 1.19.1rc1 (2020-08-25) ============================== Bugfixes -------- - Fix a bug introduced in v1.19.0 where appservices with ratelimiting disabled would still be ratelimited when joining rooms. ([\#8139](https://github.com/matrix-org/synapse/issues/8139)) - Fix a bug introduced in v1.19.0 that would cause e.g. profile updates to fail due to incorrect application of rate limits on join requests. ([\#8153](https://github.com/matrix-org/synapse/issues/8153))
| * Fix join ratelimiter breaking profile updates and idempotency (#8153)Brendan Abolivier2020-08-242-4/+93
| |
* | Stop shadow-banned users from sending non-member events. (#8142)Patrick Cloke2020-08-241-1/+54
| |
* | Allow capping a room's retention policy (#8104)Brendan Abolivier2020-08-241-28/+66
| |
* | Fix flaky shadow-ban tests. (#8152)Patrick Cloke2020-08-241-1/+3
| |
* | Stop shadow-banned users from sending invites. (#8095)Patrick Cloke2020-08-201-0/+100
| |
* | Switch the JSON byte producer from a pull to a push producer. (#8116)Patrick Cloke2020-08-192-13/+7
|/
* Add type hints to handlers.message and events.builder (#8067)Erik Johnston2020-08-121-1/+3
|
* Revert #7736 (#8039)Brendan Abolivier2020-08-062-175/+2
|
* Convert synapse.api to async/await (#8031)Patrick Cloke2020-08-063-9/+7
|
* Improve performance of the register endpoint (#8009)Patrick Cloke2020-08-061-1/+1
|
* Prevent join->join membership transitions changing member count (#7977)Andrew Morgan2020-08-031-1/+23
| | | | | | | | | | | `StatsHandler` handles updates to the `current_state_delta_stream`, and updates room stats such as the amount of state events, joined users, etc. However, it counts every new join membership as a new user entering a room (and that user being in another room), whereas it's possible for a user's membership status to go from join -> join, for instance when they change their per-room profile information. This PR adds a check for join->join membership transitions, and bails out early, as none of the further checks are necessary at that point. Due to this bug, membership stats in many rooms have ended up being wildly larger than their true values. I am not sure if we also want to include a migration step which recalculates these statistics (possibly using the `_populate_stats_process_rooms` bg update). Bug introduced in the initial implementation https://github.com/matrix-org/synapse/pull/4338.
* Re-implement unread counts (#7736)Brendan Abolivier2020-07-292-2/+175
|
* Return the proper 403 Forbidden error during errors with JWT logins. (#7844)Patrick Cloke2020-07-151-21/+22
|
* Add the option to validate the `iss` and `aud` claims for JWT logins. (#7827)Patrick Cloke2020-07-141-6/+100
|
* Do not use canonicaljson to magically handle decoding bytes from JSON. (#7802)Patrick Cloke2020-07-101-1/+1
|
* Fix some spelling mistakes / typos. (#7811)Patrick Cloke2020-07-093-3/+3
|
* Fix inconsistent handling of upper and lower cases of email addresses. (#7021)Dirk Klimpel2020-07-031-30/+145
| | | fixes #7016
* add org.matrix.login.jwt so that m.login.jwt can be deprecated (#7675)Sorunome2020-06-241-3/+7
|
* Replace all remaining six usage with native Python 3 equivalents (#7704)Dagfinn Ilmari Mannsåker2020-06-162-6/+5
|
* Performance improvements and refactor of Ratelimiter (#7595)Andrew Morgan2020-06-055-37/+48
| | | | | | | | | | While working on https://github.com/matrix-org/synapse/issues/5665 I found myself digging into the `Ratelimiter` class and seeing that it was both: * Rather undocumented, and * causing a *lot* of config checks This PR attempts to refactor and comment the `Ratelimiter` class, as well as encourage config file accesses to only be done at instantiation. Best to be reviewed commit-by-commit.
* Fix a bug in automatic user creation with m.login.jwt. (#7585)Olof Johansson2020-06-011-0/+153
|
* Convert sending mail to async/await. (#7557)Erik Johnston2020-05-221-2/+2
| | | | Mainly because sometimes the email push code raises exceptions where the stack traces have gotten lost, which is hopefully fixed by this.
* Allow expired accounts to logout (#7443)Andrew Morgan2020-05-142-2/+103
|
* Do not validate that the client dict is stable during UI Auth. (#7483)Patrick Cloke2020-05-131-45/+10
| | | | This backs out some of the validation for the client dictionary and logs if this changes during a user interactive authentication session instead.
* Rework UI Auth session validation for registration (#7455)Patrick Cloke2020-05-081-88/+216
| | | | Be less strict about validation of UI authentication sessions during registration to match client expecations.
* Persist user interactive authentication sessions (#7302)Patrick Cloke2020-04-301-0/+40
| | | | | By persisting the user interactive authentication sessions to the database, this fixes situations where a user hits different works throughout their auth session and also allows sessions to persist through restarts of Synapse.
* Fix limit logic for EventsStream (#7358)Richard van der Hoff2020-04-291-1/+1
| | | | | | | | | | | | | | | | | | | * Factor out functions for injecting events into database I want to add some more flexibility to the tools for injecting events into the database, and I don't want to clutter up HomeserverTestCase with them, so let's factor them out to a new file. * Rework TestReplicationDataHandler This wasn't very easy to work with: the mock wrapping was largely superfluous, and it's useful to be able to inspect the received rows, and clear out the received list. * Fix AssertionErrors being thrown by EventsStream Part of the problem was that there was an off-by-one error in the assertion, but also the limit logic was too simple. Fix it all up and add some tests.
* Revert "Revert "Merge pull request #7315 from ↵Brendan Abolivier2020-04-232-1/+62
| | | | | | matrix-org/babolivier/request_token"" This reverts commit 1adf6a55870aa08de272591ff49db9dc49738076.
* Fix the parameters of a test fixture (#7243)Zay11Zay2020-04-141-1/+1
|
* Default PL100 to enable encryption in a room (#7230)Andrew Morgan2020-04-092-4/+297
|
* Do not allow a deactivated user to login via SSO. (#7240)Patrick Cloke2020-04-091-3/+39
|
* Merge pull request #7157 from matrix-org/rev.outbound_device_pokes_testsRichard van der Hoff2020-03-301-2/+2
|\ | | | | Add tests for outbound device pokes
| * Remove spurious "name" parameter to `default_config`Richard van der Hoff2020-03-241-2/+2
| | | | | | | | | | this is never set to anything other than "test", and is a source of unnecessary boilerplate.
* | Always whitelist the login fallback for SSO (#7153)Richard van der Hoff2020-03-271-1/+8
| | | | | | | | | | | | | | That fallback sets the redirect URL to itself (so it can process the login token then return gracefully to the client). This would make it pointless to ask the user for confirmation, since the URL the confirmation page would be showing wouldn't be the client's.
* | Add options to prevent users from changing their profile. (#7096)Dirk Klimpel2020-03-271-0/+302
| |
* | Allow server admins to define and enforce a password policy (MSC2000). (#7118)Dirk Klimpel2020-03-261-0/+179
| |
* | Validate that the session is not modified during UI-Auth (#7068)Patrick Cloke2020-03-261-1/+67
| |
* | Clean up some LoggingContext stuff (#7120)Richard van der Hoff2020-03-241-8/+8
|/ | | | | | | | | | | | | | | | | | | | | | | * 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.
* Remove special casing of `m.room.aliases` events (#7034)Patrick Cloke2020-03-171-15/+26
|
* Revert "Add options to disable setting profile info for prevent changes. ↵Richard van der Hoff2020-03-171-303/+0
| | | | | | | (#7053)" This reverts commit 54dd28621b070ca67de9f773fe9a89e1f4dc19da, reversing changes made to 6640460d054e8f4444046a34bdf638921b31c01e.
* Add options to disable setting profile info for prevent changes. (#7053)Brendan Abolivier2020-03-101-0/+303
|\
| * lint, fix testsdklimpel2020-03-091-2/+2
| |
| * updates after reviewdklimpel2020-03-091-10/+7
| |
| * lintdklimpel2020-03-091-10/+8
| |
| * add testsdklimpel2020-03-091-0/+308
| |
* | Merge branch 'master' into developBrendan Abolivier2020-03-031-0/+111
|\ \
| * | Add a whitelist for the SSO confirmation step.Richard van der Hoff2020-03-021-3/+29
| | |
| * | Add a confirmation step to the SSO login flowBrendan Abolivier2020-03-021-0/+85
| | |
* | | Validate the alt_aliases property of canonical alias events (#6971)Patrick Cloke2020-03-031-0/+160
| |/ |/|
* | Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-211-13/+15
|/ | | | Ensure good comprehension hygiene using flake8-comprehensions.
* Merge pull request #6949 from matrix-org/rav/list_room_aliases_peekableRichard van der Hoff2020-02-191-0/+17
|\ | | | | Make room alias lists peekable
| * Make room alias lists peekableRichard van der Hoff2020-02-191-0/+17
| | | | | | | | | | | | As per https://github.com/matrix-org/matrix-doc/pull/2432#pullrequestreview-360566830, make room alias lists accessible to users outside world_readable rooms.
* | Move MSC2432 stuff onto unstable prefix (#6948)Richard van der Hoff2020-02-191-3/+13
|/ | | it's not in the spec yet, so needs to be unstable. Also add a feature flag for it. Also add a test for admin users.
* Implement GET /_matrix/client/r0/rooms/{roomId}/aliases (#6939)Richard van der Hoff2020-02-181-1/+69
| | | | | per matrix-org/matrix-doc#2432
* Raise the default power levels for invites, tombstones and server acls (#6834)Andrew Morgan2020-02-171-1/+3
|
* MSC2260: Block direct sends of m.room.aliases events (#6794)Richard van der Hoff2020-01-301-26/+15
| | | | | as per MSC2260
* Fix `/events/:event_id` deprecated API. (#6731)Erik Johnston2020-01-201-0/+27
|
* Add `local_current_membership` table (#6655)Erik Johnston2020-01-152-12/+9
| | | | | | | Currently we rely on `current_state_events` to figure out what rooms a user was in and their last membership event in there. However, if the server leaves the room then the table may be cleaned up and that information is lost. So lets add a table that separately holds that information.
* Quarantine media by ID or user ID (#6681)Andrew Morgan2020-01-131-0/+37
|
* Merge release-v1.7.1 into developRichard van der Hoff2019-12-181-0/+127
|\
| * Incorporate reviewBrendan Abolivier2019-12-161-5/+0
| |
| * LintBrendan Abolivier2019-12-161-2/+1
| |
| * Add test caseBrendan Abolivier2019-12-161-0/+133
| |
* | Add option to allow profile queries without sharing a room (#6523)Will Hunt2019-12-161-0/+2
| |
* | Port handlers.account_validity to async/await.Erik Johnston2019-12-101-2/+1
|/
* Fixup functions to consistently return deferredsErik Johnston2019-12-061-1/+3
|
* Fixup testsErik Johnston2019-12-052-1/+12
|
* Merge pull request #6329 from matrix-org/babolivier/context_filtersBrendan Abolivier2019-12-043-100/+381
|\ | | | | Filter state, events_before and events_after in /context requests
| * Un-remove room purge testBrendan Abolivier2019-12-041-0/+72
| |
| * Merge branch 'babolivier/context_filters' of github.com:matrix-org/synapse ↵Brendan Abolivier2019-12-041-1/+1
| |\ | | | | | | | | | into babolivier/context_filters
| | * Merge branch 'develop' into babolivier/context_filtersBrendan Abolivier2019-11-261-0/+173
| | |\
| * | \ Merge branch 'develop' into babolivier/context_filtersBrendan Abolivier2019-12-043-2/+437
| |\ \ \ | | |/ / | |/| |
| * | | LintBrendan Abolivier2019-11-051-30/+41
| | | |
| * | | Update copyrightsBrendan Abolivier2019-11-053-1/+7
| | | |
| * | | Add tests for /searchBrendan Abolivier2019-11-051-44/+143
| | | |
| * | | Merge labels tests for /context and /messagesBrendan Abolivier2019-11-051-146/+130
| | | |
| * | | Add test caseBrendan Abolivier2019-11-051-0/+182
| | | |
* | | | Add ephemeral messages support (MSC2228) (#6409)Brendan Abolivier2019-12-031-0/+101
| |/ / |/| | | | | | | | | | | | | | | | | | | | 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
* | | Add testsErik Johnston2019-11-281-0/+140
| | |
* | | Merge pull request #6358 from matrix-org/babolivier/message_retentionBrendan Abolivier2019-11-271-0/+293
|\ \ \ | | | | | | | | Implement message retention policies (MSC1763)
| * \ \ Merge branch 'develop' into babolivier/message_retentionBrendan Abolivier2019-11-261-0/+74
| |\ \ \ | | | |/ | | |/|
| * | | Don't restrict the tests to v1 roomsBrendan Abolivier2019-11-261-2/+0
| | | |
| * | | Lint againBrendan Abolivier2019-11-191-10/+2
| | | |
| * | | LintBrendan Abolivier2019-11-191-50/+23
| | | |
| * | | Don't apply retention policy based filtering on state eventsBrendan Abolivier2019-11-061-0/+10
| | | | | | | | | | | | | | | | 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.
| * | | Implement per-room message retention policiesBrendan Abolivier2019-11-041-0/+320
| | |/ | |/|
* | | Remove assertion and provide a clear warning on startup for missing ↵Andrew Morgan2019-11-261-0/+1
| |/ |/| | | | | public_baseurl (#6379)
* | LintBrendan Abolivier2019-11-201-6/+8
| |
* | Test if a purge can make /messages return 500 responsesBrendan Abolivier2019-11-201-0/+72
|/
* Incorporate reviewBrendan Abolivier2019-11-012-8/+8
|
* Incorporate reviewBrendan Abolivier2019-11-012-10/+10
|