summary refs log tree commit diff
path: root/tests/rest (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'de5cafe98' into dinsicAndrew Morgan2020-12-313-43/+13
|\
| * Remove some extraneous @unittest.INFOs on unit tests (#8592)Andrew Morgan2020-10-202-2/+0
| |
* | Merge commit '3ee17585c' into dinsicAndrew Morgan2020-12-311-4/+24
|\|
| * 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`.
* | Merge commit '74976a8e4' into dinsicAndrew Morgan2020-12-319-96/+191
|\|
| * 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.
* | Allow users to click account renewal links multiple times without hitting an ↵Andrew Morgan2020-12-301-17/+36
| | | | | | | | 'Invalid Token' page (#74)
* | Support PyJWT v2.0.0. (#8986)Patrick Cloke2020-12-291-4/+12
| | | | | | | | Tests were broken due to an API changing. The code used in Synapse proper should be compatible with both versions already.
* | Override any missing default power level keys with DINUM's defaults when ↵Andrew Morgan2020-10-291-0/+47
| | | | | | | | | | | | | | creating a room (#68) The createRoom flow in DINUM's Synapse (through the AccessRules module which has hooks for all of this) already rejects a power levels content dict if it doesn't have high enough power levels to satisfy DINUM's [requirements](https://github.com/matrix-org/synapse-dinsic/blob/ac50ed353b5fdbdf9f853be0d94b6fccaf33973e/synapse/third_party_rules/access_rules.py#L233-L252). This PR ensures that any keys that aren't provided are replaced with the defaults, instead of just assuming the whole dict was correct (and thus those keys were set to mainline Synapse's default instead).
* | Merge commit 'cc40a59b4' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-211-4/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cc40a59b4': 1.21.0 Add prometheus metrics to track federation delays (#8430) Make token serializing/deserializing async (#8427) Allow additional SSO properties to be passed to the client (#8413) changelog Add an improved "forward extremities" metric Rewrite BucketCollector Fix _exposition.py to stop stripping samples Drop support for ancient prometheus_client (#8426) Various clean ups to room stream tokens. (#8423) changelog Report state res metrics to Prometheus and log Move Measure calls into `resolve_events_with_store` Expose a `get_resource_usage` method in `Measure` Move `resolve_events_with_store` into StateResolutionHandler
| * 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
| |
* | Merge commit 'f43c66d23' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-211-0/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f43c66d23': Add support for running Complement against the local checkout (#8317) Filter out appservices from mau count (#8404) Only assert valid next_link params when provided (#8417) Add metrics to track success/otherwise of replication requests (#8406) Fix handling of connection timeouts in outgoing http requests (#8400) Changelog Don't check whether a 3pid is allowed to register during password reset Add checks for postgres sequence consistency (#8402) Create a mechanism for marking tests "logcontext clean" (#8399) Add `ui_auth_sessions_ips` table to `synapse_port_db` ignore list (#8410) A pair of tiny cleanups in the federation request code. (#8401) typo
| * 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.
* | Merge commit '4325be1a5' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-215-5/+625
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4325be1a5': Fix missing null character check on guest_access room state Fixed a bug with reactivating users with the admin API (#8362) Admin API for reported events (#8217) Fix wording of deprecation notice in changelog Deprecation warning for synapse admin api being accessible under /_matrix Create function to check for long names in devices (#8364) Add a comment re #1691 Fix a bad merge from release-v1.20.0. (#8354) Admin API for querying rooms where a user is a member (#8306) Catch-up after Federation Outage (bonus): Catch-up on Synapse Startup (#8322) Simplify super() calls to Python 3 syntax. (#8344) Allow appservice users to /login (#8320) Update test logging to be able to accept braces (#8335) Move lint dependencies to extras_require (#8330)
| * Fixed a bug with reactivating users with the admin API (#8362)Dirk Klimpel2020-09-221-0/+14
| | | | | | | | | | | | | | Fixes: #8359 Trying to reactivate a user with the admin API (`PUT /_synapse/admin/v2/users/<user_name>`) causes an internal server error. Seems to be a regression in #8033.
| * Admin API for reported events (#8217)Dirk Klimpel2020-09-221-0/+382
| | | | | | Add an admin API to read entries of table `event_reports`. API: `GET /_synapse/admin/v1/event_reports`
| * Create function to check for long names in devices (#8364)Dionysis Grigoropoulos2020-09-221-1/+1
| | | | | | | | | | | | | | | | | | * Create a new function to verify that the length of a device name is under a certain threshold. * Refactor old code and tests to use said function. * Verify device name length during registration of device * Add a test for the above Signed-off-by: Dionysis Grigoropoulos <dgrig@erethon.com>
| * Admin API for querying rooms where a user is a member (#8306)Dirk Klimpel2020-09-181-2/+94
| | | | | | | | Add a new admin API `GET /_synapse/admin/v1/users/<user_id>/joined_rooms` to list all rooms where a user is a member.
| * Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-181-1/+1
| | | | | | | | | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
| * 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>
* | Merge commit '837293c31' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '837293c31': Remove obsolete __future__ imports (#8337) Use admin_patterns for all admin APIs. (#8331) Fix a potential bug of UnboundLocalError (#8329) Switch metaclass initialization to python 3-compatible syntax (#8326) Catch-up after Federation Outage (split, 4): catch-up loop (#8272) Use slots in attrs classes where possible (#8296) Fix typos in comments. Add the topic and avatar to the room details admin API (#8305) Improve SAML error messages (#8248) Add experimental support for sharding event persister. Again. (#8294) Make `StreamToken.room_key` be a `RoomStreamToken` instance. (#8281) Use TLSv1.2 for fake servers in tests (#8208) Add /_synapse/client to the reverse proxy docs (#8227) Clean up `Notifier.on_new_room_event` code path (#8288)
| * Add the topic and avatar to the room details admin API (#8305)Tulir Asokan2020-09-141-0/+2
| |
* | Merge commit 'a3a90ee03' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-202-11/+57
|\| | | | | | | | | | | | | | | | | | | * commit 'a3a90ee03': Show a confirmation page during user password reset (#8004) Do not error when thumbnailing invalid files (#8236) Remove some unused distributor signals (#8216) Fixup pusher pool notifications (#8287) Revert "Fixup pusher pool notifications" Fixup pusher pool notifications
| * 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.
| * Do not error when thumbnailing invalid files (#8236)Patrick Cloke2020-09-091-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.
* | Merge commit '453dfe210' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-0/+448
|\| | | | | | | | | | | * commit '453dfe210': blacklist MSC2753 sytests until it's implemented in synapse (#8285) Don't remember `enabled` of deleted push rules and properly return 404 for missing push rules in `.../actions` and `.../enabled` (#7796)
| * 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.
* | Merge commit 'cca03dbec' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-3/+3
|\| | | | | | | | | | | | | | | | | * commit 'cca03dbec': fix typo s/fixes/fix/ Directly import json from the standard library. (#8259) Allow for make_awaitable's return value to be re-used. (#8261) Rename 'populate_stats_process_rooms_2' background job back to 'populate_stats_process_rooms' again (#8243)
| * Allow for make_awaitable's return value to be re-used. (#8261)Patrick Cloke2020-09-081-3/+3
| |
* | Merge commit '17fa4c7ca' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-204-174/+90
|\| | | | | | | | | | | | | | | * commit '17fa4c7ca': Catch up after Federation Outage (split, 2): Track last successful stream ordering after transmission (#8247) Catch-up after Federation Outage (split, 1) (#8230) Fix type signature in simple_select_one_onecol and friends (#8241) Stop sub-classing object (#8249)
| * Stop sub-classing object (#8249)Patrick Cloke2020-09-043-5/+5
| |
* | Merge commit '112266eaf' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-2/+155
|\| | | | | | | | | | | * commit '112266eaf': Add StreamStore to mypy (#8232) Re-implement unread counts (again) (#8059)
| * Re-implement unread counts (again) (#8059)Brendan Abolivier2020-09-021-2/+155
| |
* | Merge commit '0d4f614fd' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-0/+138
|\| | | | | | | | | | | | | | | | | * commit '0d4f614fd': Refactor `_get_e2e_device_keys_for_federation_query_txn` (#8225) Add experimental support for sharding event persister. (#8170) Add /user/{user_id}/shared_rooms/ api (#7785) Do not try to store invalid data in the stats table (#8226) Convert the main methods run by the reactor to async. (#8213)
| * 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>
* | Merge commit 'e00816ad9' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-2/+6
|\| | | | | | | | | * commit 'e00816ad9': Do not yield on awaitables in tests. (#8193)
| * Do not yield on awaitables in tests. (#8193)Patrick Cloke2020-08-271-2/+6
| |
* | Merge commit 'b49a5b930' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-5/+4
|\| | | | | | | | | * commit 'b49a5b930': Convert stats and related calls to async/await (#8192)
| * Convert stats and related calls to async/await (#8192)Patrick Cloke2020-08-271-5/+4
| |
* | Merge commit 'a466b6797' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-203-158/+315
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a466b6797': Reduce run-times of tests by advancing the reactor less (#7757) Update debian systemd service to use Type=notify (#8169) Remove remaining is_guest argument uses from get_room_data calls (#8181) Do not propagate typing notifications from shadow-banned users. (#8176) Remove unused parameter from, and add safeguard in, get_room_data (#8174) Add required Debian dependencies to allow docker builds on the arm platform (#8144) Allow running mypy directly. (#8175) Update the test federation client to handle streaming responses (#8130) Do not propagate profile changes of shadow-banned users into rooms. (#8157) Make SlavedIdTracker.advance have same interface as MultiWriterIDGenerator (#8171) Convert simple_select_one and simple_select_one_onecol to async (#8162)
| * 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
| |
* | Merge commit '56efa9ec7' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-202-43/+237
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '56efa9ec7': (22 commits) Fix rate limiting unit tests. (#8167) Add functions to `MultiWriterIdGen` used by events stream (#8164) Do not allow send_nonmember_event to be called with shadow-banned users. (#8158) Changelog fixes Make StreamIdGen `get_next` and `get_next_mult` async (#8161) Wording fixes to 'name' user admin api filter (#8163) Fix missing double-backtick in RST document Search in columns 'name' and 'displayname' in the admin users endpoint (#7377) Add type hints for state. (#8140) Stop shadow-banned users from sending non-member events. (#8142) Allow capping a room's retention policy (#8104) Add healthcheck for default localhost 8008 port on /health endpoint. (#8147) Fix flaky shadow-ban tests. (#8152) Don't fail /submit_token requests on incorrect session ID if request_token_inhibit_3pid_errors is turned on (#7991) Do not apply ratelimiting on joins to appservices (#8139) Micro-optimisations to get_auth_chain_ids (#8132) Allow denying or shadow banning registrations via the spam checker (#8034) Stop shadow-banned users from sending invites. (#8095) Be more tolerant of membership events in unknown rooms (#8110) Improve the error code when trying to register using a name reserved for guests. (#8135) ...
| * 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))
| * | 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
| | |
* | | Merge commit 'b79d69796' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-202-4/+93
|\ \ \ | | |/ | |/| | | | | | | | | | * commit 'b79d69796': 1.19.1rc1 Fix join ratelimiter breaking profile updates and idempotency (#8153)
| * | Fix join ratelimiter breaking profile updates and idempotency (#8153)Brendan Abolivier2020-08-242-4/+93
| | |
* | | Merge commit 'c9c544cda' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-192-13/+7
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c9c544cda': Remove `ChainedIdGenerator`. (#8123) Switch the JSON byte producer from a pull to a push producer. (#8116) Updated docs: Added note about missing 308 redirect support. (#8120) Be stricter about JSON that is accepted by Synapse (#8106) Convert runWithConnection to async. (#8121) Remove the unused inlineCallbacks code-paths in the caching code (#8119) Separate `get_current_token` into two. (#8113) Convert events worker database to async/await. (#8071) Add a link to the matrix-synapse-rest-password-provider. (#8111)
| * | Switch the JSON byte producer from a pull to a push producer. (#8116)Patrick Cloke2020-08-192-13/+7
| |/
* | Merge commit '5dd73d029' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-1/+3
|\| | | | | | | | | * commit '5dd73d029': Add type hints to handlers.message and events.builder (#8067)
| * Add type hints to handlers.message and events.builder (#8067)Erik Johnston2020-08-121-1/+3
| |
* | Merge commit '7620912d8' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-0/+34
|\| | | | | | | | | * commit '7620912d8': Add health check endpoint (#8048)
| * Add health check endpoint (#8048)Erik Johnston2020-08-071-0/+34
| |
* | Merge commit '2ffd6783c' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-192-175/+2
|\| | | | | | | | | * commit '2ffd6783c': Revert #7736 (#8039)
| * Revert #7736 (#8039)Brendan Abolivier2020-08-062-175/+2
| |
* | Merge commit 'd4a7829b1' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-194-12/+14
|\| | | | | | | | | * commit 'd4a7829b1': Convert synapse.api to async/await (#8031)
| * Convert synapse.api to async/await (#8031)Patrick Cloke2020-08-064-12/+14
| |
* | Merge commit '66f24449d' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-1/+1
|\| | | | | | | | | * commit '66f24449d': Improve performance of the register endpoint (#8009)
| * Improve performance of the register endpoint (#8009)Patrick Cloke2020-08-061-1/+1
| |
* | Merge commit 'a7bdf98d0' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-161-2/+2
|\| | | | | | | | | * commit 'a7bdf98d0': Rename database classes to make some sense (#8033)
| * Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-2/+2
| |
* | Merge commit '5d92a1428' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-161-1/+23
|\| | | | | | | | | * commit '5d92a1428': Prevent join->join membership transitions changing member count (#7977)
| * 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.
* | Merge commit 'c978f6c45' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-162-4/+4
|\| | | | | | | | | * commit 'c978f6c45': Convert federation client to async/await. (#7975)
| * Convert federation client to async/await. (#7975)Patrick Cloke2020-07-302-4/+4
| |
* | Merge commit '3950ae51e' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-163-4/+230
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3950ae51e': Ensure that remove_pusher is always async (#7981) Ensure the msg property of HttpResponseException is a string. (#7979) Remove from the event_relations table when purging historical events. (#7978) Add additional logging for SAML sessions. (#7971) Add MSC reference to changelog for #7736 Re-implement unread counts (#7736) Various improvements to the docs (#7899) Convert storage layer to async/await. (#7963) Add an option to disable purge in delete room admin API (#7964) Move some log lines from default logger to sql/transaction loggers (#7952) Use the JSON module from the std library instead of simplejson. (#7936) Fix exit code for `check_line_terminators.sh` (#7970) Option to allow server admins to join complex rooms (#7902) Fix typo in metrics docs (#7966) Add script for finding files with unix line terminators (#7965) Convert the remaining media repo code to async / await. (#7947) Convert a synapse.events to async/await. (#7949) Convert groups and visibility code to async / await. (#7951) Convert push to async/await. (#7948)
| * Re-implement unread counts (#7736)Brendan Abolivier2020-07-292-2/+175
| |
| * Add an option to disable purge in delete room admin API (#7964)Dirk Klimpel2020-07-281-2/+55
| | | | | | | | | | | | Add option ```purge``` to ```POST /_synapse/admin/v1/rooms/<room_id>/delete``` Fixes: #3761 Signed-off-by: Dirk Klimpel dirk@klimpel.org
* | "Freeze" a room when the last admin of that room leaves (#59)Andrew Morgan2020-10-131-1/+130
| | | | | | | | | | | | | | | | If the last admin of a room departs, and thus the room no longer has any admins within it, we "freeze" the room. Freezing a room means that the power level required to do anything in the room (sending messages, inviting others etc) will require power level 100. At the moment, an admin can come back and unfreeze the room manually. The plan is to eventually make unfreezing of the room automatic on admin rejoin, though that will be in a separate PR. This *could* work in mainline, however if the admin who leaves is on a homeserver without this functionality, then the room isn't frozen. I imagine this would probably be pretty confusing to people. Part of this feature was allowing Synapse modules to send events, which has been implemented in mainline at https://github.com/matrix-org/synapse/pull/8479, and cherry-picked to the `dinsic` fork in 62c7b10. The actual freezing logic has been implemented here in the RoomAccessRules module.
* | Allow modules to create and send events into rooms (#8479)Andrew Morgan2020-10-122-86/+170
| | | | | | | | | | | | | | | | 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. This commit has been cherry-picked from mainline.
* | Swap method calls in RoomAccessTestCase.test_change_rules (#64)Andrew Morgan2020-09-181-5/+6
| | | | | | | | | | Swap these calls around, as the check for changing `restricted` to `unrestricted` will actually change `self.restricted_room` to an unrestricted room. Do that last, instead of first. Additionally add a comment with a warning.
* | Make AccessRules use the public rooms directory instead of checking a room's ↵Andrew Morgan2020-09-182-54/+230
| | | | | | | | | | | | | | join rules on rule change (#63) This PR switches several conditions regarding room access rules to check against the status of the room's inclusion in the public room list instead of its join rules. The code includes a snapshot of https://github.com/matrix-org/synapse/pull/8292, which will likely change in time and need merging in again.
* | Override the power levels defaults, enforce mod requirement for invites, ↵Andrew Morgan2020-09-111-5/+52
| | | | | | | | | | | | | | | | | | | | admin requirements for unknown state events (#61) This PR modifies the `RoomAccessRules` module, an implementation of `ThirdPartyEventRules`, to both: * Modify the default power levels when creating a room to set: - `invite` to be minimum PL50 - `state_default` to be minimum PL100 * Enforce this when creating the room.
* | RoomAccessRules cleanup (#62)Andrew Morgan2020-09-101-34/+27
| | | | | | | | | | | | | | Various cleanups of the DINUM-specific `RoomAccessRules` module, including: * Type hints * Docstring cleanups * Some code cleanups
* | Add a config option for validating 'next_link' parameters against a domain ↵Andrew Morgan2020-09-091-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.
* | Merge commit 'f88c48f3b' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-033-1456/+1585
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f88c48f3b': 1.18.0rc1 Fix error reporting when using `opentracing.trace` (#7961) Fix typing replication not being handled on master (#7959) Remove hacky error handling for inlineDeferreds. (#7950) Convert tests/rest/admin/test_room.py to unix file endings (#7953) Support oEmbed for media previews. (#7920) Convert state resolution to async/await (#7942) Fix up types and comments that refer to Deferreds. (#7945) Do not convert async functions to Deferreds in the interactive_auth_handler (#7944) Convert more of the media code to async/await (#7873) Return an empty body for OPTIONS requests. (#7886) Downgrade warning on client disconnect to INFO (#7928) Convert presence handler helpers to async/await. (#7939) Update the auth providers to be async. (#7935) Put a cache on `/state_ids` (#7931)
| * Convert tests/rest/admin/test_room.py to unix file endings (#7953)Andrew Morgan2020-07-271-1447/+1447
| | | | | | | | | | Converts tests/rest/admin/test_room.py to have unix file endings after they were accidentally changed in #7613. Keeping the same changelog as #7613 as it hasn't gone out in a release yet.
| * Support oEmbed for media previews. (#7920)Patrick Cloke2020-07-271-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 Cloke2020-07-241-1/+4
| |
* | Merge commit 'de119063f' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-0/+46
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'de119063f': (31 commits) Convert room list handler to async/await. (#7912) Element CSS and logo in email templates (#7919) Lint the contrib/ directory in CI and linting scripts, add synctl to linting script (#7914) Remove unused code from synapse.logging.utils. (#7897) Fix a typo in the sample config. (#7890) Fix deprecation warning: import ABC from collections.abc (#7892) Change sample config's postgres user to synapse_user (#7889) Fix deprecation warning due to invalid escape sequences (#7895) Remove Ubuntu Eoan that is now EOL (#7888) Fix the trace function for async functions. (#7872) Add help for creating a user via docker (#7885) Switch to Debian:Slim from Alpine for the docker image (#7839) Stop using 'device_max_stream_id' (#7882) Fix TypeError in synapse.notifier (#7880) Add a default limit (of 100) to get/sync operations. (#7858) Change "unknown room ver" logging to warning. (#7881) Convert device handler to async/await (#7871) Convert synapse.app to async/await. (#7868) Convert _base, profile, and _receipts handlers to async/await (#7860) Add admin endpoint to get members in a room. (#7842) ...
| * Add admin endpoint to get members in a room. (#7842)Michael Albert2020-07-161-0/+46
| |
* | Merge commit 'a973bcb8a' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-032-21/+69
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a973bcb8a': Add some tiny type annotations (#7870) Remove obsolete comment. Ensure that calls to `json.dumps` are compatible with the standard library json. (#7836) Avoid brand new rooms in `delete_old_current_state_events` (#7854) Allow accounts to be re-activated from the admin APIs. (#7847) Fix tests Fix typo Newsfile Use get_users_in_room rather than state handler in typing for speed Fix client reader sharding tests (#7853) Convert E2E key and room key handlers to async/await. (#7851) Return the proper 403 Forbidden error during errors with JWT logins. (#7844) remove `retry_on_integrity_error` wrapper for persist_events (#7848)
| * Allow accounts to be re-activated from the admin APIs. (#7847)Patrick Cloke2020-07-151-0/+47
| |
| * Return the proper 403 Forbidden error during errors with JWT logins. (#7844)Patrick Cloke2020-07-151-21/+22
| |
* | Merge commit '491f0dab1' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-0/+395
|\| | | | | | | | | * commit '491f0dab1': Add delete room admin endpoint (#7613)
| * Add delete room admin endpoint (#7613)Dirk Klimpel2020-07-141-0/+395
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Delete Room admin API allows server admins to remove rooms from server and block these rooms. `DELETE /_synapse/admin/v1/rooms/<room_id>` It is a combination and improvement of "[Shutdown room](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/shutdown_room.md)" and "[Purge room](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/purge_room.md)" API. Fixes: #6425 It also fixes a bug in [synapse/storage/data_stores/main/room.py](synapse/storage/data_stores/main/room.py) in ` get_room_with_stats`. It should return `None` if the room is unknown. But it returns an `IndexError`. https://github.com/matrix-org/synapse/blob/901b1fa561e3cc661d78aa96d59802cf2078cb0d/synapse/storage/data_stores/main/room.py#L99-L105 Related to: - #5575 - https://github.com/Awesome-Technologies/synapse-admin/issues/17 Signed-off-by: Dirk Klimpel dirk@klimpel.org
* | Merge commit '77d2c0541' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-6/+100
|\| | | | | | | | | * commit '77d2c0541': Add the option to validate the `iss` and `aud` claims for JWT logins. (#7827)
| * Add the option to validate the `iss` and `aud` claims for JWT logins. (#7827)Patrick Cloke2020-07-141-6/+100
| |
* | Merge commit '66a4af8d9' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-1/+1
|\| | | | | | | | | * commit '66a4af8d9': Do not use canonicaljson to magically handle decoding bytes from JSON. (#7802)
| * Do not use canonicaljson to magically handle decoding bytes from JSON. (#7802)Patrick Cloke2020-07-101-1/+1
| |
* | Merge commit '43726783e' into dinsicAndrew Morgan2020-08-035-7/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '43726783e': (22 commits) 1.17.0rc1 Fix some spelling mistakes / typos. (#7811) `update_membership` declaration: now always returns an event id. (#7809) Improve stacktraces from exceptions in background processes (#7808) Fix `can only concatenate list (not "tuple") to list` exception (#7810) Pass original request headers from workers to the main process. (#7797) Generate real events when we reject invites (#7804) Add `HomeServer.signing_key` property (#7805) Revert "Update the installation docs on apt-transport-https (#7801)" Do not use simplejson in Synapse. (#7800) Stop passing bytes when dumping JSON (#7799) Update the installation docs on apt-transport-https (#7801) shuffle changelog slightly Change Caddy links (old is deprecated) (#7789) Stop populating unused table `local_invites`. (#7793) Refactor getting replication updates from database v2. (#7740) Add libwebp dependency to Dockerfile (#7791) Add documentation for JWT login type and improve sample config. (#7776) Convert the appservice handler to async/await. (#7775) Don't ignore `set_tweak` actions with no explicit `value`. (#7766) ...
| * Fix some spelling mistakes / typos. (#7811)Patrick Cloke2020-07-093-3/+3
| |
| * Stop populating unused table `local_invites`. (#7793)Richard van der Hoff2020-07-071-1/+0
| | | | | | | | | | This table is no longer used, so we may as well stop populating it. Removing it would prevent people rolling back to older releases of Synapse, so that can happen in a future release.
| * isort 5 compatibility (#7786)Will Hunt2020-07-051-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.
* | Merge commit '5cdca53aa' into dinsicAndrew Morgan2020-08-031-30/+145
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '5cdca53aa': Merge different Resource implementation classes (#7732) Fix inconsistent handling of upper and lower cases of email addresses. (#7021) Allow YAML config file to contain None (#7779) Fix a typo. Move 1.15.2 after 1.16.0rc2. 1.16.0rc2 Remove an extraneous space. Add links to the fixes. Fix tense in the release notes. Hack to add push priority to push notifications (#7765) Add early returns to `_check_for_soft_fail` (#7769) Use symbolic names for replication stream names (#7768) Type checking for `FederationHandler` (#7770) Fix new metric where we used ms instead of seconds (#7771) Fix incorrect error message when database CTYPE was set incorrectly. (#7760) Pin link in CHANGES.md Fixes to CHANGES.md
| * Fix inconsistent handling of upper and lower cases of email addresses. (#7021)Dirk Klimpel2020-07-031-30/+145
| | | | | | fixes #7016
* | Merge commit 'dc80a0762' into dinsicAndrew Morgan2020-08-032-75/+72
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'dc80a0762': 1.16.0rc1 Back out MSC2625 implementation (#7761) Additional configuration options for auto-join rooms (#7763) Add some metrics for inbound and outbound federation processing times (#7755) Explain the purpose of the "tests" conditional dependency requirement (#7751) Add another yield point to state res v2 (#7746) Move flake8 to end. Don't exit script on failure (#7738) Make tox actions work on Debian 10 (#7703) Yield during large v2 state res. (#7735) add org.matrix.login.jwt so that m.login.jwt can be deprecated (#7675) Set Content-Length for Metrics requests (#7730) Sync ignored table names in synapse_port_db to current database schema (#7717) Allow local media to be marked as safe from being quarantined. (#7718) Convert directory handler to async/await (#7727) Speed up state res v2 across large state differences. (#7725)
| * add org.matrix.login.jwt so that m.login.jwt can be deprecated (#7675)Sorunome2020-06-241-3/+7
| |
| * Allow local media to be marked as safe from being quarantined. (#7718)Patrick Cloke2020-06-221-72/+65
| |
* | Merge commit '434716e1d' into dinsicAndrew Morgan2020-08-031-1/+1
|\| | | | | | | | | * commit '434716e1d': Fetch from the r0 media path instead of the unspecced v1. (#7714)
| * Fetch from the r0 media path instead of the unspecced v1. (#7714)Patrick Cloke2020-06-171-1/+1
| |
* | Merge commit 'a3f11567d' into dinsicAndrew Morgan2020-08-033-7/+6
|\| | | | | | | | | * commit 'a3f11567d': Replace all remaining six usage with native Python 3 equivalents (#7704)
| * Replace all remaining six usage with native Python 3 equivalents (#7704)Dagfinn Ilmari Mannsåker2020-06-163-7/+6
| |
* | Merge branch 'release-v1.15.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-248-82/+1073
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.15.x * 'release-v1.15.0' of github.com:matrix-org/synapse: (55 commits) 1.15.0 Fix some attributions Update CHANGES.md 1.15.0rc1 Revert "1.15.0rc1" 1.15.0rc1 Fix bug in account data replication stream. (#7656) Convert the registration handler to async/await. (#7649) Accept device information at the login fallback endpoint. (#7629) Convert user directory handler and related classes to async/await. (#7640) Add an option to disable autojoin for guest accounts (#6637) Clarifications to the admin api documentation (#7647) Update to the stable SSO prefix for UI Auth. (#7630) Fix type information on `assert_*_is_admin` methods (#7645) Remove some unused constants. (#7644) Typo fixes. Allow new users to be registered via the admin API even if the monthly active user limit has been reached (#7263) Add device management to admin API (#7481) Attempt to fix PhoneHomeStatsTestCase.test_performance_100 being flaky. (#7634) Support CS API v0.6.0 (#6585) ...
| * Allow new users to be registered via the admin API even if the monthly ↵Dirk Klimpel2020-06-051-15/+163
| | | | | | | | active user limit has been reached (#7263)
| * Add device management to admin API (#7481)Dirk Klimpel2020-06-051-0/+541
| | | | | | | | | | | | | | | | | | | | - Admin is able to - change displaynames - delete devices - list devices - get device informations Fixes #7330
| * Add support for webp thumbnailing (#7586)WGH2020-06-051-36/+99
| | | | | | | | | | Closes #4382 Signed-off-by: Maxim Plotnikov <wgh@torlan.ru>
| * 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
| |
| * Email notifications for new users when creating via the Admin API. (#7267)Dirk Klimpel2020-06-011-0/+75
| |
* | Prevent M_USER_IN_USE from being raised by registration methods until after ↵Andrew Morgan2020-06-221-8/+0
| | | | | | | | | | | | email has been verified (#48) * Just ignore the `username` parameter on registration as it's not used by DINUM * Have `/register/available` always return `true`
* | Performance improvements to marking expired users as inactive (#47)Andrew Morgan2020-06-191-10/+27
| | | | | | This is a performance-related improvement to #13, which queried and hid active *and* already inactive users, one-by-one. This PR updates the code to query only **active**, expired users, all at once, and then mark them as inactive, all at once.
* | Merge branch 'release-v1.14.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-104-4/+146
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.14.x * 'release-v1.14.0' of github.com:matrix-org/synapse: (108 commits) Fix typo in PR link Update debian changelog 1.14.0 Improve changelog wording 1.14.0rc2 Fix sample config docs error (#7581) Fix up comments Fix specifying cache factors via env vars with * in name. (#7580) Don't apply cache factor to event cache. (#7578) Ensure ReplicationStreamer is always started when replication enabled. (#7579) Remove the changes to the debian changelog Not full release yet, this is rc1 Merge event persistence move changelog entries More changelog fix Changelog fixes 1.14.0 Replace device_27_unique_idx bg update with a fg one (#7562) Fix incorrect exception handling in KeyUploadServlet.on_POST (#7563) Fix recording of federation stream token (#7564) Simplify reap_monthly_active_users (#7558) ...
| * 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
| |
| * Merge tag 'v1.13.0rc2' into developRichard van der Hoff2020-05-141-45/+10
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.13.0rc2 (2020-05-14) ============================== Bugfixes -------- - Fix a long-standing bug which could cause messages not to be sent over federation, when state events with state keys matching user IDs (such as custom user statuses) were received. ([\#7376](https://github.com/matrix-org/synapse/issues/7376)) - Restore compatibility with non-compliant clients during the user interactive authentication process, fixing a problem introduced in v1.13.0rc1. ([\#7483](https://github.com/matrix-org/synapse/issues/7483)) Internal Changes ---------------- - Fix linting errors in new version of Flake8. ([\#7470](https://github.com/matrix-org/synapse/issues/7470))
| * \ Merge branch 'release-v1.13.0' into developAndrew Morgan2020-05-111-88/+216
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * release-v1.13.0: Don't UPGRADE database rows RST indenting Put rollback instructions in upgrade notes Fix changelog typo Oh yeah, RST Absolute URL it is then Fix upgrade notes link Provide summary of upgrade issues in changelog. Fix ) Move next version notes from changelog to upgrade notes Changelog fixes 1.13.0rc1 Documentation on setting up redis (#7446) Rework UI Auth session validation for registration (#7455) Fix errors from malformed log line (#7454) Drop support for redis.dbid (#7450)
| * | | Add room details admin endpoint (#7317)Manuel Stahl2020-05-071-0/+41
| | | |
* | | | Merge branch 'release-v1.13.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-1014-654/+1987
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.14.x * 'release-v1.13.0' of github.com:matrix-org/synapse: (257 commits) Update changelog based on feedback. Move warnings in the changelog and re-iterate changes to branches. 1.13.0 update dh-virtualenv (#7526) 1.13.0rc3 Hash passwords earlier in the registration process (#7523) 1.13.0rc2 1.13.0rc2 Stop `get_joined_users` corruption from custom statuses (#7376) Do not validate that the client dict is stable during UI Auth. (#7483) Fix new flake8 errors (#7489) Don't UPGRADE database rows RST indenting Put rollback instructions in upgrade notes Fix changelog typo Oh yeah, RST Absolute URL it is then Fix upgrade notes link Provide summary of upgrade issues in changelog. Fix ) Move next version notes from changelog to upgrade notes ...
| * | | 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.
| * Return total number of users and profile attributes in admin users endpoint ↵Manuel Stahl2020-04-281-0/+2
| | | | | | | | | | (#6881) Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de>
| * Revert "Revert "Merge pull request #7315 from ↵Brendan Abolivier2020-04-232-1/+62
| | | | | | | | | | | | matrix-org/babolivier/request_token"" This reverts commit 1adf6a55870aa08de272591ff49db9dc49738076.
| * Extend room admin api with additional attributes (#7225)Dirk Klimpel2020-04-222-592/+680
| |
| * Allow specifying the value of Accept-Language header for URL previews (#7265)Andrew Morgan2020-04-151-0/+55
| |
| * 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-302-4/+4
| |\ | | | | | | Add tests for outbound device pokes
| | * Remove spurious "name" parameter to `default_config`Richard van der Hoff2020-03-242-4/+4
| | | | | | | | | | | | | | | 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.
| * | Admin API to join users to a room. (#7051)Dirk Klimpel2020-03-271-0/+288
| | |
| * | 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.
* | apply lintingAndrew Morgan2020-05-142-9/+8
| |
* | Remove special casing of `m.room.aliases` events (#7034)Andrew Morgan2020-03-242-15/+33
|\| | | | | | | | | * commit '60724c46b': Remove special casing of `m.room.aliases` events (#7034)
| * Remove special casing of `m.room.aliases` events (#7034)Patrick Cloke2020-03-172-15/+33
| |
| * 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
| |\ \
* | \ \ v1.11.1Andrew Morgan2020-03-241-0/+111
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'fd983fad9': v1.11.1 Fix wrong handler being used in SAML handler Factor out complete_sso_login and expose it to the Module API Add a whitelist for the SSO confirmation step. Add a confirmation step to the SSO login flow
| * | | Add a whitelist for the SSO confirmation step.Richard van der Hoff2020-03-021-3/+29
| | | |
| * | | Merge remote-tracking branch 'origin/release-v1.11.1' into release-v1.11.1Richard van der Hoff2020-03-021-28/+181
| |\ \ \
| * | | | Add a confirmation step to the SSO login flowBrendan Abolivier2020-03-021-0/+85
| | | | |
* | | | | Validate the alt_aliases property of canonical alias events (#6971)Andrew Morgan2020-03-241-0/+160
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | * commit '7dcbc33a1': Validate the alt_aliases property of canonical alias events (#6971)
| * | | | Validate the alt_aliases property of canonical alias events (#6971)Patrick Cloke2020-03-031-0/+160
| | |_|/ | |/| |
* | | | Fix py35-old CI by using native tox. (#7018)Andrew Morgan2020-03-241-0/+60
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3ab8e9c29': Fix py35-old CI by using native tox. (#7018) remove spurious changelog rst->md
* | | | Fixed set a user as an admin with the new API (#6928)Andrew Morgan2020-03-241-60/+0
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | * commit 'bbeee33d6': Fixed set a user as an admin with the new API (#6928)
| * | | Fixed set a user as an admin with the new API (#6928)Dirk Klimpel2020-03-021-28/+181
| | |/ | |/| | | | | | | Fix #6910
* | | Fixed set a user as an admin with the new API (#6928)Andrew Morgan2020-03-241-32/+186
|\ \ \ | | |/ | |/| | | | | | | * commit '9b06d8f8a': Fixed set a user as an admin with the new API (#6928)
| * | Fixed set a user as an admin with the new API (#6928)Dirk Klimpel2020-02-281-32/+186
| | | | | | | | | Fix #6910
* | | Ensure 'deactivated' parameter is a boolean on user admin API, Fix error ↵Andrew Morgan2020-03-241-0/+59
|\| | | | | | | | | | | | | | | | | | | | handling of call to deactivate user (#6990) * commit '8c75b621b': Ensure 'deactivated' parameter is a boolean on user admin API, Fix error handling of call to deactivate user (#6990)
| * | Ensure 'deactivated' parameter is a boolean on user admin API, Fix error ↵Andrew Morgan2020-02-261-0/+59
| | | | | | | | | | | | handling of call to deactivate user (#6990)
* | | Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Andrew Morgan2020-03-241-13/+15
|\| | | | | | | | | | | | | | | | | | | | * commit '509e381af': Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957) changelog Increase MAX_EVENTS_BEHIND for replication clients
| * | 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_peekableAndrew Morgan2020-03-241-0/+17
|\| | | | | | | | | | | | | | | * commit '2fb7794e6': changelog Make room alias lists peekable Add `allow_departed_users` param to `check_in_room_or_world_readable` Refactor the membership check methods in Auth
| * 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)Andrew Morgan2020-03-241-3/+13
|\| | | | | | | | | | | | | | * commit '880aaac1d': Move MSC2432 stuff onto unstable prefix (#6948)
| * | 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)Andrew Morgan2020-03-241-1/+69
|\| | | | | | | | | * commit 'adfaea8c6': Implement GET /_matrix/client/r0/rooms/{roomId}/aliases (#6939)
| * 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-03-231-1/+3
|\| | | | | | | | | * commit '3404ad289': Raise the default power levels for invites, tombstones and server acls (#6834)
| * Raise the default power levels for invites, tombstones and server acls (#6834)Andrew Morgan2020-02-171-1/+3
| |
* | Return a 404 for admin api user lookup if user not found (#6901)Andrew Morgan2020-03-231-0/+16
|\| | | | | | | | | | | * commit 'd8994942f': Return a 404 for admin api user lookup if user not found (#6901) Move the warning at the top of the release changes
| * Return a 404 for admin api user lookup if user not found (#6901)Andrew Morgan2020-02-121-0/+16
| |
* | Admin api to add an email address (#6789)Andrew Morgan2020-03-231-2/+17
|\| | | | | | | | | * commit '56ca93ef5': Admin api to add an email address (#6789)
| * Admin api to add an email address (#6789)Dirk Klimpel2020-02-071-2/+17
| |
* | MSC2260: Block direct sends of m.room.aliases events (#6794)Andrew Morgan2020-03-232-33/+15
|\| | | | | | | | | * commit '184303b86': MSC2260: Block direct sends of m.room.aliases events (#6794)
| * MSC2260: Block direct sends of m.room.aliases events (#6794)Richard van der Hoff2020-01-302-33/+15
| | | | | | | | | | as per MSC2260
* | Admin API to list, filter and sort rooms (#6720)Andrew Morgan2020-03-232-6/+391
|\| | | | | | | | | * commit '90a28fb47': Admin API to list, filter and sort rooms (#6720)
| * Admin API to list, filter and sort rooms (#6720)Andrew Morgan2020-01-221-4/+389
| |
* | Merge pull request #6764 from matrix-org/babolivier/fix-thumbnailAndrew Morgan2020-03-231-4/+44
|\| | | | | | | | | | | | | | | * commit 'ae6cf586b': Lint + changelog Remove unused import Add tests for thumbnailing Fix typo in _select_thumbnail
| * Lint + changelogBrendan Abolivier2020-01-221-3/+1
| |
| * Remove unused importBrendan Abolivier2020-01-221-1/+1
| |
| * Add tests for thumbnailingBrendan Abolivier2020-01-221-3/+45
| |
* | Fix and add test to deprecated quarantine media admin api (#6756)Andrew Morgan2020-03-231-4/+11
|\| | | | | | | | | * commit 'aa9b00fb2': Fix and add test to deprecated quarantine media admin api (#6756)
| * Fix and add test to deprecated quarantine media admin api (#6756)Andrew Morgan2020-01-221-4/+11
| |
* | Fix `/events/:event_id` deprecated API. (#6731)Andrew Morgan2020-03-231-0/+27
|\| | | | | | | | | * commit '74b74462f': Fix `/events/:event_id` deprecated API. (#6731)
| * Fix `/events/:event_id` deprecated API. (#6731)Erik Johnston2020-01-201-0/+27
| |
* | Fix changing password via user admin API. (#6730)Andrew Morgan2020-03-231-0/+13
|\| | | | | | | | | * commit 'ceecedc68': Fix changing password via user admin API. (#6730)
| * Fix changing password via user admin API. (#6730)Erik Johnston2020-01-201-0/+13
| |
* | Fix purge_room admin API (#6711)Andrew Morgan2020-03-231-3/+1
|\| | | | | | | | | * commit '19a1aac48': Fix purge_room admin API (#6711)
| * Fix purge_room admin API (#6711)Erik Johnston2020-01-151-3/+1
| |
* | Add `local_current_membership` table (#6655)Andrew Morgan2020-03-232-12/+9
|\| | | | | | | | | * commit '28c98e51f': Add `local_current_membership` table (#6655)
| * 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-03-232-0/+378
|\| | | | | | | | | * commit '1177d3f3a': Quarantine media by ID or user ID (#6681)
| * Quarantine media by ID or user ID (#6681)Andrew Morgan2020-01-132-0/+378
| |
* | Allow admin users to create or modify users without a shared secret (#6495)Andrew Morgan2020-03-232-338/+465
|\| | | | | | | | | | | * commit 'd2906fe66': Allow admin users to create or modify users without a shared secret (#6495) Fixup changelog
| * Allow admin users to create or modify users without a shared secret (#6495)Manuel Stahl2020-01-092-338/+465
| | | | | | Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de>
* | Fix GET request on /_synapse/admin/v2/users endpoint (#6563)Andrew Morgan2020-03-201-0/+41
|\| | | | | | | | | * commit '7caaa29da': Fix GET request on /_synapse/admin/v2/users endpoint (#6563)
| * Fix GET request on /_synapse/admin/v2/users endpoint (#6563)Manuel Stahl2020-01-081-0/+41
| | | | | | | | Fixes #6552
* | Back out ill-advised notary server hackery (#6657)Andrew Morgan2020-03-203-4/+131
|\| | | | | | | | | * commit '573fee759': Back out ill-advised notary server hackery (#6657)
| * Back out ill-advised notary server hackery (#6657)Richard van der Hoff2020-01-083-4/+131
| | | | | | | | | | | | | | | | | | | | | | This was ill-advised. We can't modify verify_keys here, because the response object has already been signed by the requested key. Furthermore, it's somewhat unnecessary because existing versions of Synapse (which get upset that the notary key isn't present in verify_keys) will fall back to a direct fetch via `/key/v2/server`. Also: more tests for fetching keys via perspectives: it would be nice if we actually tested when our fetcher can't talk to our notary impl.
* | Workaround for error when fetching notary's own key (#6620)Andrew Morgan2020-03-201-0/+130
|\| | | | | | | | | * commit '18674eebb': Workaround for error when fetching notary's own key (#6620)
| * Workaround for error when fetching notary's own key (#6620)Richard van der Hoff2020-01-061-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Kill off redundant SynapseRequestFactory We already get the Site via the Channel, so there's no need for a dedicated RequestFactory: we can just use the right constructor. * Workaround for error when fetching notary's own key As a notary server, when we return our own keys, include all of our signing keys in verify_keys. This is a workaround for #6596.
| * Merge release-v1.7.1 into developRichard van der Hoff2019-12-181-0/+127
| |\
* | \ Merge pull request #6553 from matrix-org/babolivier/fix-context-filterAndrew Morgan2020-03-191-0/+127
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | * commit '631653036': Incorporate review Update changelog.d/6553.bugfix Lint Add test case Changelog Update the documentation of the filtering function Use the filtered version of an event when responding to /context requests for that event
| * | 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)Andrew Morgan2020-03-191-1/+2
|\ \ \ | | |/ | |/| | | | | | | * commit 'bfb95654c': Add option to allow profile queries without sharing a room (#6523)
| * | Add option to allow profile queries without sharing a room (#6523)Will Hunt2019-12-161-0/+2
| | |
* | | Merge pull request #6504 from matrix-org/erikj/account_validity_async_awaitAndrew Morgan2020-03-191-2/+1
|\| | | | | | | | | | | | | | | | | | | | * commit '31905a518': Newsfile Port handlers.account_validity to async/await. Port handlers.account_data to async/await.
| * | Port handlers.account_validity to async/await.Erik Johnston2019-12-101-2/+1
| |/
* | Merge pull request #6484 from matrix-org/erikj/port_sync_handlerAndrew Morgan2020-03-191-1/+3
|\| | | | | | | | | | | | | * commit 'a9b393340': Fixup functions to consistently return deferreds Newsfile Port SyncHandler to async/await
| * Merge pull request #6484 from matrix-org/erikj/port_sync_handlerErik Johnston2019-12-091-1/+3
| |\ | | | | | | Port SyncHandler to async/await
| | * Fixup functions to consistently return deferredsErik Johnston2019-12-061-1/+3
| | |
* | | Merge pull request #6469 from matrix-org/erikj/make_database_classAndrew Morgan2020-03-191-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f3ea2f5a0': Remove unused var Fix DB scripts Newsfile Move background update handling out of store Comments Move DB pool and helper functions into dedicated Database class
| * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-12-062-1/+12
| |\| | | | | | | | | | erikj/make_database_class
| * | Move DB pool and helper functions into dedicated Database classErik Johnston2019-12-051-1/+1
| | |
* | | Merge pull request #6482 from matrix-org/erikj/port_rest_v1Andrew Morgan2020-03-192-1/+12
|\ \ \ | | |/ | |/| | | | | | | | | | | | | * commit 'af5d0ebc7': Newsfile Fixup tests Port rest/v1 to async/await
| * | Fixup testsErik Johnston2019-12-052-1/+12
| |/
* | Merge pull request #6464 from matrix-org/erikj/make_public_sql_baseAndrew Morgan2020-03-191-1/+1
|\| | | | | | | | | | | | | * commit 'ddbbfc951': Newsfile Remove underscore from SQLBaseStore functions Don't call SQLBaseStore methods from outside stores
| * Remove underscore from SQLBaseStore functionsErik Johnston2019-12-041-1/+1
| |
* | Merge pull request #6329 from matrix-org/babolivier/context_filtersAndrew Morgan2020-03-193-100/+381
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c530f9af4': Un-remove room purge test Incorporate review Format changelog Update changelog since this isn't going to be featured in 1.6.0 Also filter state events Only filter if a filter was provided Update copyright Lint Update copyrights Changelog Add tests for /search Merge labels tests for /context and /messages Add test case Filter events_before and events_after in /context requests
| * 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-263-1/+213
| | | |\
| | * | \ Merge branch 'develop' into babolivier/context_filtersBrendan Abolivier2019-12-045-3/+477
| | |\ \ \ | | | |/ / | | |/| |
| | * | | 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
| | | | |