summary refs log tree commit diff
path: root/synapse/handlers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'b74919c72' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-2/+15
|\ | | | | | | | | * commit 'b74919c72': Add debugging to sync response generation (#7929)
| * Add debugging to sync response generation (#7929)Richard van der Hoff2020-07-221-2/+15
| |
* | Merge commit 'de119063f' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-039-309/+366
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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) ...
| * Convert room list handler to async/await. (#7912)Patrick Cloke2020-07-211-33/+29
| |
| * Fix deprecation warning: import ABC from collections.abc (#7892)Karthikeyan Singaravelan2020-07-201-1/+1
| |
| * Fix TypeError in synapse.notifier (#7880)Erik Johnston2020-07-171-0/+8
| | | | | | Fixes #7774
| * Convert device handler to async/await (#7871)Patrick Cloke2020-07-171-136/+105
| |
| * Convert _base, profile, and _receipts handlers to async/await (#7860)Patrick Cloke2020-07-174-53/+41
| |
| * Reject attempts to join empty rooms over federation (#7859)Richard van der Hoff2020-07-161-2/+13
| | | | | | | | | | | | We shouldn't allow others to make_join through us if we've left the room; reject such attempts with a 404. Fixes #7835. Fixes #6958.
| * Allow moving typing off master (#7869)Erik Johnston2020-07-161-74/+167
| |
| * Merge pull request #7866 from matrix-org/rav/fix_guest_user_idRichard van der Hoff2020-07-161-21/+1
| |\ | | | | | | Fix guest user registration with lots of client readers
| | * Use a postgres sequence to generate guest user IDsRichard van der Hoff2020-07-161-21/+1
| | |
* | | Merge commit 'a973bcb8a' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-036-153/+134
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
| * | Add some tiny type annotations (#7870)Richard van der Hoff2020-07-161-6/+4
| | | | | | | | | I found these made pycharm have more of a clue as to what was going on in other places.
| * | Ensure that calls to `json.dumps` are compatible with the standard library ↵Patrick Cloke2020-07-151-1/+2
| | | | | | | | | | | | json. (#7836)
| * | Merge branch 'erikj/faster_typing' of github.com:matrix-org/synapse into developErik Johnston2020-07-151-2/+2
| |\ \ | | |/ | |/|
| | * Fix typoErik Johnston2020-07-151-1/+1
| | |
| | * Use get_users_in_room rather than state handler in typing for speedErik Johnston2020-07-151-2/+2
| | |
| * | Allow accounts to be re-activated from the admin APIs. (#7847)Patrick Cloke2020-07-151-20/+28
| |/
| * Convert E2E key and room key handlers to async/await. (#7851)Patrick Cloke2020-07-152-124/+98
| |
* | Merge commit '491f0dab1' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-2/+206
|\| | | | | | | | | * commit '491f0dab1': Add delete room admin endpoint (#7613)
| * Add delete room admin endpoint (#7613)Dirk Klimpel2020-07-141-2/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 '457096e6d' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-1/+2
|\| | | | | | | | | * commit '457096e6d': Support handling registration requests across multiple client readers. (#7830)
| * Support handling registration requests across multiple client readers. (#7830)Patrick Cloke2020-07-131-1/+2
| |
* | 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 'f1245dc3c' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-8/+19
|\| | | | | | | | | * commit 'f1245dc3c': Fix resync remote devices on receive PDU in worker mode. (#7815)
| * Fix resync remote devices on receive PDU in worker mode. (#7815)Erik Johnston2020-07-101-8/+19
| | | | | | | | | | | | The replication client requires that arguments are given as keyword arguments, which was not done in this case. We also pull out the logic so that we can catch and handle any exceptions raised, rather than leaving them unhandled.
* | Merge commit 'e29c44340' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-12/+37
|\| | | | | | | | | * commit 'e29c44340': Fix recursion error when fetching auth chain over federation (#7817)
| * Fix recursion error when fetching auth chain over federation (#7817)Erik Johnston2020-07-101-12/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When fetching the state of a room over federation we receive the event IDs of the state and auth chain. We then fetch those events that we don't already have. However, we used a function that recursively fetched any missing auth events for the fetched events, which can lead to a lot of recursion if the server is missing most of the auth chain. This work is entirely pointless because would have queued up the missing events in the auth chain to be fetched already. Let's just diable the recursion, since it only gets called from one place anyway.
* | Merge commit '43726783e' into dinsicAndrew Morgan2020-08-0310-131/+204
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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) ...
| * `update_membership` declaration: now always returns an event id. (#7809)Richard van der Hoff2020-07-092-5/+5
| |
| * Fix `can only concatenate list (not "tuple") to list` exception (#7810)Richard van der Hoff2020-07-091-1/+1
| | | | | | It seems auth_events can be either a list or a tuple, depending on Things.
| * Generate real events when we reject invites (#7804)Richard van der Hoff2020-07-093-76/+158
| | | | | | | | | | | | | | | | Fixes #2181. The basic premise is that, when we fail to reject an invite via the remote server, we can generate our own out-of-band leave event and persist it as an outlier, so that we have something to send to the client.
| * Add `HomeServer.signing_key` property (#7805)Richard van der Hoff2020-07-082-2/+2
| | | | | | ... instead of duplicating `config.signing_key[0]` everywhere
| * Stop passing bytes when dumping JSON (#7799)Patrick Cloke2020-07-081-2/+2
| |
| * Refactor getting replication updates from database v2. (#7740)Erik Johnston2020-07-071-0/+3
| |
| * Convert the appservice handler to async/await. (#7775)Patrick Cloke2020-07-061-42/+32
| |
| * isort 5 compatibility (#7786)Will Hunt2020-07-052-4/+2
| | | | | | 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-033-84/+89
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+3
| | | | | | fixes #7016
| * Merge tag 'v1.16.0rc2' into developPatrick Cloke2020-07-021-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.16.0rc2 (2020-07-02) ============================== Synapse 1.16.0rc2 includes the security fixes released with Synapse 1.15.2. Please see [below](https://github.com/matrix-org/synapse/blob/master/CHANGES.md#synapse-1152-2020-07-02) for more details. Improved Documentation ---------------------- - Update postgres image in example `docker-compose.yaml` to tag `12-alpine`. ([\#7696](https://github.com/matrix-org/synapse/issues/7696)) Internal Changes ---------------- - Add some metrics for inbound and outbound federation latencies: `synapse_federation_server_pdu_process_time` and `synapse_event_processing_lag_by_event`. ([\#7771](https://github.com/matrix-org/synapse/issues/7771))
| | * Merge branch 'master' into release-v1.16.0Patrick Cloke2020-07-023-35/+14
| | |\
| | * | Fix new metric where we used ms instead of seconds (#7771)Erik Johnston2020-07-011-1/+1
| | | | | | | | | | | | | | | | Introduced in #7755, not yet released.
| * | | Merge branch 'master' into developPatrick Cloke2020-07-023-35/+14
| |\ \ \ | | | |/ | | |/|
| * | | Add early returns to `_check_for_soft_fail` (#7769)Richard van der Hoff2020-07-011-64/+55
| | | | | | | | | | | | | | | | my editor was complaining about unset variables, so let's add some early returns to fix that and reduce indentation/cognitive load.
| * | | Type checking for `FederationHandler` (#7770)Richard van der Hoff2020-07-011-17/+30
| | |/ | |/| | | | fix a few things to make this pass mypy.
* | | Merge commit 'e8c36e527' into dinsicAndrew Morgan2020-08-033-35/+14
|\ \ \ | | |/ | |/| | | | | | | | | | | | | * commit 'e8c36e527': 1.15.2 Correctly handle outliers as prev events over federation Ensure that HTML pages served from Synapse include headers to avoid embedding.
| * | Correctly handle outliers as prev events over federationErik Johnston2020-07-021-3/+3
| | |
| * | Ensure that HTML pages served from Synapse include headers to avoid embedding.Patrick Cloke2020-07-022-32/+11
| | |
* | | Merge commit 'dc80a0762' into dinsicAndrew Morgan2020-08-036-105/+207
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
| * | Back out MSC2625 implementation (#7761)Brendan Abolivier2020-07-011-3/+0
| | |
| * | Additional configuration options for auto-join rooms (#7763)Patrick Cloke2020-06-301-62/+168
| | |
| * | Add some metrics for inbound and outbound federation processing times (#7755)Erik Johnston2020-06-301-0/+6
| | |
| * | Yield during large v2 state res. (#7735)Erik Johnston2020-06-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | State res v2 across large data sets can be very CPU intensive, and if all the relevant events are in the cache the algorithm will run from start to finish within a single reactor tick. This can result in blocking the reactor tick for several seconds, which can have major repercussions on other requests. To fix this we simply add the occaisonal `sleep(0)` during iterations to yield execution until the next reactor tick. The aim is to only do this for large data sets so that we don't impact otherwise quick resolutions.=
| * | Convert directory handler to async/await (#7727)Patrick Cloke2020-06-222-40/+32
| | |
* | | Merge commit '363082561' into dinsicAndrew Morgan2020-08-031-18/+11
|\| | | | | | | | | | | | | | * commit '363082561': Convert the typing handler to async/await. (#7679)
| * | Convert the typing handler to async/await. (#7679)Patrick Cloke2020-06-171-18/+11
| | |
* | | Merge commit '46613aaf7' into dinsicAndrew Morgan2020-08-031-0/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '46613aaf7': (27 commits) Incorporate review Lint Incorporate review bits Pre-populate the unread_count column Don't update the schema version Use attr instead of a dict Lint Test that a mark_unread action updates the right counter when using a slave store Remove debug logging Test that a mark_unread action updates the right counter Fix summary rotation Log for invalid values of notif Fix SQL Fix schema update Lint Save the count of unread messages to event_push_summary Actually act on mark_unread Appease mypy Lint Use temporary prefixes as per the MSC ...
| * | Implement unread counter (MSC2625) (#7673)Brendan Abolivier2020-06-171-0/+3
| |\ \ | | | | | | | | Implementation of https://github.com/matrix-org/matrix-doc/pull/2625
| | * \ Merge branch 'develop' into babolivier/mark_unreadBrendan Abolivier2020-06-1514-82/+60
| | |\ \
| | * \ \ Merge branch 'develop' into babolivier/mark_unreadBrendan Abolivier2020-06-152-29/+57
| | |\ \ \
| | * | | | Appease mypyBrendan Abolivier2020-06-101-1/+1
| | | | | |
| | * | | | LintBrendan Abolivier2020-06-101-3/+3
| | | | | |
| | * | | | Use temporary prefixes as per the MSCBrendan Abolivier2020-06-101-1/+3
| | | | | |
| | * | | | Add a new unread_counter to sync responsesBrendan Abolivier2020-06-101-0/+1
| | | |_|/ | | |/| |
* | | | | Merge commit 'f6f7511a4' into dinsicAndrew Morgan2020-08-032-11/+58
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit 'f6f7511a4': Refactor getting replication updates from database. (#7636)
| * | | | Refactor getting replication updates from database. (#7636)Erik Johnston2020-06-162-11/+58
| | | | | | | | | | | | | | | The aim here is to make it easier to reason about when streams are limited and when they're not, by moving the logic into the database functions themselves. This should mean we can kill of `db_query_to_update_function` function.
* | | | | Merge commit 'a3f11567d' into dinsicAndrew Morgan2020-08-036-21/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | * 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-166-22/+13
| | | | |
* | | | | Merge commit '98c4e35e3' into dinsicAndrew Morgan2020-08-032-31/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit '98c4e35e3': Convert the device message and pagination handlers to async/await. (#7678)
| * | | | Convert the device message and pagination handlers to async/await. (#7678)Patrick Cloke2020-06-162-31/+18
| | | | |
* | | | | Merge commit '03619324f' into dinsicAndrew Morgan2020-08-0314-115/+114
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '03619324f': Create a ListenerConfig object (#7681) Fix changelog wording 1.15.1 Wrap register_device coroutine in an ensureDeferred (#7684) Ensure the body is a string before comparing push rules. (#7701) Ensure etag is a string for GET room_keys/version response (#7691) Update m.id.phone to use 'phone' instead of 'number' (#7687) Fix "There was no active span when trying to log." error (#7698) Enable 3PID add/bind/unbind endpoints on r0 routes Discard RDATA from already seen positions. (#7648) Replace iteritems/itervalues/iterkeys with native versions. (#7692) Fix warnings about losing log context during UI auth. (#7688) Fix a typo when comparing the URI & method during UI Auth. (#7689) Remove "user_id" from GET /presence. (#7606) Increase the default SAML session expirary time to 15 minutes. (#7664) fix typo in sample_config.yaml (#7652) Take out a lock before modifying _CACHES (#7663) Add option to enable encryption by default for new rooms (#7639) Clean-up the fallback login code. (#7657)
| * | | | Ensure etag is a string for GET room_keys/version response (#7691)Hubert Chathi2020-06-151-0/+1
| | | | |
| * | | | Fix "There was no active span when trying to log." error (#7698)Erik Johnston2020-06-151-0/+1
| | |_|/ | |/| |
| * | | Replace iteritems/itervalues/iterkeys with native versions. (#7692)Patrick Cloke2020-06-1513-81/+59
| | | |
| * | | Fix a typo when comparing the URI & method during UI Auth. (#7689)Patrick Cloke2020-06-121-1/+1
| | |/ | |/|
| * | Add option to enable encryption by default for new rooms (#7639)Andrew Morgan2020-06-102-29/+57
| |/ | | | | | | | | | | | | | | | | Fixes https://github.com/matrix-org/synapse/issues/2431 Adds config option `encryption_enabled_by_default_for_room_type`, which determines whether encryption should be enabled with the default encryption algorithm in private or public rooms upon creation. Whether the room is private or public is decided based upon the room creation preset that is used. Part of this PR is also pulling out all of the individual instances of `m.megolm.v1.aes-sha2` into a constant variable to eliminate typos ala https://github.com/matrix-org/synapse/pull/7637 Based on #7637
* | Add option to autobind user's email on registration (#51)Andrew Morgan2020-07-022-24/+45
| | | | | | | | | | Adds an option, `bind_new_user_emails_to_sydent`, which uses Sydent's [internal bind api](https://github.com/matrix-org/sydent#internal-bind-and-unbind-api) to automatically bind email addresses of users immediately after they register. This is quite enterprise-specific, but could be generally useful to multiple organizations. This aims to solve the problem of requiring users to verify their email twice when using the functionality of an identity server in a corporate deployment - where both the homeserver and identity server are controlled. It does with while eliminating the need for the `account_threepid_delegates.email` option, which historically has been a very complicated option to reason about.
* | Merge branch 'release-v1.15.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-2417-445/+397
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) ...
| * Convert the registration handler to async/await. (#7649)Patrick Cloke2020-06-081-66/+41
| |
| * Convert user directory handler and related classes to async/await. (#7640)Patrick Cloke2020-06-054-107/+73
| |
| * Add an option to disable autojoin for guest accounts (#6637)Travis Ralston2020-06-051-1/+7
| | | | | | | | Fixes https://github.com/matrix-org/synapse/issues/3177
| * Typo fixes.Patrick Cloke2020-06-051-1/+1
| |
| * Allow new users to be registered via the admin API even if the monthly ↵Dirk Klimpel2020-06-051-1/+6
| | | | | | | | active user limit has been reached (#7263)
| * Performance improvements and refactor of Ratelimiter (#7595)Andrew Morgan2020-06-054-56/+38
| | | | | | | | | | | | | | | | | | | | 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.
| * Cleanups to the OpenID Connect integration (#7628)Richard van der Hoff2020-06-031-7/+20
| | | | | | | | docs, default configs, comments. Nothing very significant.
| * Check if the localpart is reserved for guests earlier in the registration ↵Brendan Abolivier2020-06-031-9/+9
| | | | | | | | | | flow (#7625) This is so the user is warned about the username not being valid as soon as possible, rather than only once they've finished UIA.
| * Fix exceptions when fetching events from a down host. (#7622)Erik Johnston2020-06-031-1/+1
| | | | | | We already caught some exceptions, but not all.
| * Clean up exception handling in SAML2ResponseResource (#7614)Richard van der Hoff2020-06-031-30/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | * Expose `return_html_error`, and allow it to take a Jinja2 template instead of a raw string * Clean up exception handling in SAML2ResponseResource * use the existing code in `return_html_error` instead of re-implementing it (giving it a jinja2 template rather than inventing a new form of template) * do the exception-catching in the REST layer rather than in the handler layer, to make sure we catch all exceptions.
| * Process cross-signing keys when resyncing device lists (#7594)Brendan Abolivier2020-06-012-18/+62
| | | | | | It looks like `user_device_resync` was ignoring cross-signing keys from the results received from the remote server. This patch fixes this, by processing these keys using the same process `_handle_signing_key_updates` does (and effectively factor that part out of that function).
| * Convert groups local and server to async/await. (#7600)Patrick Cloke2020-06-011-47/+35
| |
| * Don't fail all of an iteration of the device list retry loop on error (#7609)Brendan Abolivier2020-06-011-15/+21
| | | | | | Without this patch, if an error happens which isn't caught by `user_device_resync`, then `_maybe_retry_device_resync` would fail, without retrying the next users in the iteration. This patch fixes this so that it now only logs an error in this case.
| * Fix 'FederationGroupsRoomsServlet' API when group has room server is not in. ↵Erik Johnston2020-05-291-8/+12
| | | | | | | | (#7599)
| * allow emails to be passed through SAML (#7385)Christopher Cooper2020-05-271-2/+10
| | | | | | Signed-off-by: Christopher Cooper <cooperc@ocf.berkeley.edu>
| * Convert identity handler to async/await. (#7561)Patrick Cloke2020-05-262-63/+46
| |
* | Prevent M_USER_IN_USE from being raised by registration methods until after ↵Andrew Morgan2020-06-221-1/+15
| | | | | | | | | | | | 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-194-24/+37
| | | | | | 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-1014-452/+1676
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) ...
| * Optimise some references to hs.config (#7546)Richard van der Hoff2020-05-221-3/+5
| | | | | | These are surprisingly expensive, and we only really need to do them at startup.
| * Add option to move event persistence off master (#7517)Erik Johnston2020-05-225-19/+61
| |
| * Add ability to wait for replication streams (#7542)Erik Johnston2020-05-225-70/+140
| | | | | | | | | | | | | | The idea here is that if an instance persists an event via the replication HTTP API it can return before we receive that event over replication, which can lead to races where code assumes that persisting an event immediately updates various caches (e.g. current state of the room). Most of Synapse doesn't hit such races, so we don't do the waiting automagically, instead we do so where necessary to avoid unnecessary delays. We may decide to change our minds here if it turns out there are a lot of subtle races going on. People probably want to look at this commit by commit.
| * Convert sending mail to async/await. (#7557)Erik Johnston2020-05-221-5/+4
| | | | | | | | Mainly because sometimes the email push code raises exceptions where the stack traces have gotten lost, which is hopefully fixed by this.
| * On upgrade room only send canonical alias once. (#7547)Erik Johnston2020-05-221-55/+60
| | | | | | | | | | | | | | | | Instead of doing a complicated dance of deleting and moving aliases one by one, which sends a canonical alias update into the old room for each one, lets do it all in one go. This also changes the function to move *all* local alias events to the new room, however that happens later on anyway.
| * Fix exception reporting due to HTTP request errors. (#7556)Erik Johnston2020-05-221-0/+7
| | | | | | | | These are business as usual errors, rather than stuff we want to log at error.
| * Retry to sync out of sync device lists (#7453)Brendan Abolivier2020-05-211-7/+73
| | | | | | | | | | | | | | | | | | | | | | When a call to `user_device_resync` fails, we don't currently mark the remote user's device list as out of sync, nor do we retry to sync it. https://github.com/matrix-org/synapse/pull/6776 introduced some code infrastructure to mark device lists as stale/out of sync. This commit uses that code infrastructure to mark device lists as out of sync if processing an incoming device list update makes the device handler realise that the device list is out of sync, but we can't resync right now. It also adds a looping call to retry all failed resync every 30s. This shouldn't cause too much spam in the logs as this commit also removes the "Failed to handle device list update for..." warning logs when catching `NotRetryingDestination`. Fixes #7418
| * Hash passwords earlier in the password reset process (#7538)Patrick Cloke2020-05-201-4/+1
| | | | | | | | This now matches the logic of the registration process as modified in 56db0b1365965c02ff539193e26c333b7f70d101 / #7523.
| * Omit displayname or avatar_url if they aren't set instead of returning null ↵Aaron Raimist2020-05-191-2/+6
| | | | | | | | | | | | | | | | | | (#7497) Per https://github.com/matrix-org/matrix-doc/issues/1436#issuecomment-410089470 they should be omitted instead of returning null or "". They aren't marked as required in the spec. Fixes https://github.com/matrix-org/synapse/issues/7333 Signed-off-by: Aaron Raimist <aaron@raim.ist>
| * Merge tag 'v1.13.0rc3' into developPatrick Cloke2020-05-181-7/+2
| |\ | | | | | | | | | | | | | | | | | | | | | Synapse 1.13.0rc3 (2020-05-18) Bugfixes: - Hash passwords as early as possible during registration. #7523
| * | Add type hints to room member handlers (#7513)Patrick Cloke2020-05-152-139/+173
| | |
| * | Support UI Authentication for OpenID Connect accounts (#7457)Patrick Cloke2020-05-152-20/+60
| | |
| * | Update the room member handler to use async/await. (#7507)Patrick Cloke2020-05-152-74/+58
| | |
| * | Ignore incoming presence updates when presence is disabled (#7508)Andrew Morgan2020-05-151-2/+4
| | |
| * | Merge tag 'v1.13.0rc2' into developRichard van der Hoff2020-05-141-19/+18
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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))
| * | | Allow censoring of events to happen on workers. (#7492)Erik Johnston2020-05-131-2/+0
| | | | | | | | | | | | This is safe as we can now write to cache invalidation stream on workers, and is required for when we move event persistence off master.
| * | | Convert federation handler to async/await. (#7459)Patrick Cloke2020-05-112-21/+16
| | | |
| * | | Convert search code to async/await. (#7460)Patrick Cloke2020-05-111-24/+20
| | | |
| * | | Merge branch 'release-v1.13.0' into developAndrew Morgan2020-05-111-14/+40
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
| * | | | Implement OpenID Connect-based login (#7256)Quentin Gliech2020-05-082-2/+1000
| | | | |
| * | | | Merge branch 'release-v1.13.0' into developBrendan Abolivier2020-05-071-1/+3
| |\ \ \ \
| * | | | | Add more type hints to SAML handler. (#7445)Patrick Cloke2020-05-071-12/+16
| | | | | |
| * | | | | Merge branch 'release-v1.13.0' into developRichard van der Hoff2020-05-061-4/+8
| |\ \ \ \ \
| * | | | | | Convert the room handler to async/await. (#7396)Patrick Cloke2020-05-041-24/+18
| | | | | | |
* | | | | | | Merge branch 'release-v1.13.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-1021-725/+1143
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * | | | | | Hash passwords earlier in the registration process (#7523)Patrick Cloke2020-05-181-7/+2
| | |_|_|_|/ | |/| | | |
| * | | | | Do not validate that the client dict is stable during UI Auth. (#7483)Patrick Cloke2020-05-131-19/+18
| | |_|_|/ | |/| | | | | | | | | | | | | 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-14/+40
| | |_|/ | |/| | | | | | | | | | Be less strict about validation of UI authentication sessions during registration to match client expecations.
| * | | Add a configuration setting for the dummy event threshold (#7422)Brendan Abolivier2020-05-071-1/+3
| | |/ | |/| | | | Add dummy_events_threshold which allows configuring the number of forward extremities a room needs for Synapse to send forward extremities in it.
| * | Merge branch 'release-v1.13.0' into erikj/faster_device_lists_fetchRichard van der Hoff2020-05-059-281/+250
| |\|
| | * async/await is_server_admin (#7363)Andrew Morgan2020-05-019-281/+250
| | |
| * | Speed up fetching device lists changes in sync.Erik Johnston2020-05-051-4/+8
| |/ | | | | | | | | Currently we copy `users_who_share_room` needlessly about three times, which is expensive when the set is large (which it can easily be).
| * Persist user interactive authentication sessions (#7302)Patrick Cloke2020-04-303-116/+63
| | | | | | | | | | 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.
| * Apply federation check for /publicRooms with filter list (#7367)Andrew Morgan2020-04-301-1/+5
| |
| * Convert some of the federation handler methods to async/await. (#7338)Patrick Cloke2020-04-241-25/+24
| |
| * Stop the master relaying USER_SYNC for other workers (#7318)Richard van der Hoff2020-04-223-105/+135
| | | | | | | | | | | | | | Long story short: if we're handling presence on the current worker, we shouldn't be sending USER_SYNC commands over replication. In an attempt to figure out what is going on here, I ended up refactoring some bits of the presencehandler code, so the first 4 commits here are non-functional refactors to move this code slightly closer to sanity. (There's still plenty to do here :/). Suggest reviewing individual commits. Fixes (I hope) #7257.
| * Merge branch 'release-v1.12.4' into developRichard van der Hoff2020-04-221-9/+139
| |\
| | * Query missing cross-signing keys on local sig upload (#7289)Andrew Morgan2020-04-221-9/+139
| | |
| * | import urllib.parse when using urllib.parse.quote (#7319)Andrew Morgan2020-04-221-1/+1
| | |
| * | Merge branch 'release-v1.12.4' into developRichard van der Hoff2020-04-201-129/+9
| |\|
| | * Revert "Query missing cross-signing keys on local sig upload"Richard van der Hoff2020-04-201-129/+9
| | | | | | | | | | | | | | | | | | This was incorrectly merged to the release branch before it was ready. This reverts commit 72fe2affb6ac86d433b80b6452da57052365aa26.
| * | Merge branch 'release-v1.12.4' into developRichard van der Hoff2020-04-201-9/+129
| |\|
| | * Always send the user updates to their own device list (#7160)David Baker2020-04-202-3/+18
| | |
| | * Query missing cross-signing keys on local sig uploadAndrew Morgan2020-04-171-9/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add changelog Save retrieved keys to the db lint Fix and de-brittle remote result dict processing Use query_user_devices instead, assume only master, self_signing key types Make changelog more useful Remove very specific exception handling Wrap get_verify_key_from_cross_signing_key in a try/except Note that _get_e2e_cross_signing_verify_key can raise a SynapseError lint Add comment explaining why this is useful Only fetch master and self_signing key types Fix log statements, docstrings Remove extraneous items from remote query try/except lint Factor key retrieval out into a separate function Send device updates, modeled after SigningKeyEduUpdater._handle_signing_key_updates Update method docstring
| | * Only register devices edu handler on the master process (#7255)Andrew Morgan2020-04-141-7/+11
| | |
| * | Reject unknown UI auth sessions (instead of silently generating a new one) ↵Patrick Cloke2020-04-201-65/+94
| | | | | | | | | | | | (#7268)
| * | Use a template for the SSO success page to allow for customization. (#7279)Patrick Cloke2020-04-171-32/+12
| | |
| * | Convert auth handler to async/await (#7261)Patrick Cloke2020-04-154-111/+115
| | |
| * | Only register devices edu handler on the master process (#7255)Andrew Morgan2020-04-141-7/+11
| | |
| * | Check on room creation if the user is allowed to publish the room to the ↵PeerD2020-04-131-0/+7
| | | | | | | | | | | | room directory. (#7260)
| * | typosMatthew Hodgson2020-04-111-1/+1
| | |
| * | Default PL100 to enable encryption in a room (#7230)Andrew Morgan2020-04-091-0/+1
| | |
| * | Do not allow a deactivated user to login via SSO. (#7240)Patrick Cloke2020-04-093-6/+32
| | |
| * | Improve error responses when a remote server doesn't allow you to access its ↵Andrew Morgan2020-04-061-11/+12
| | | | | | | | | | | | public rooms list (#6899)
| * | Support CAS in UI Auth flows. (#7186)Patrick Cloke2020-04-032-74/+91
| | |
| * | Support SAML in the user interactive authentication workflow. (#7102)Patrick Cloke2020-04-012-14/+153
| | |
| * | Allow admins to create aliases when they are not in the room (#7191)Patrick Cloke2020-04-011-1/+5
| | |
| * | Rewrite prune_old_outbound_device_pokes for efficiency (#7159)Richard van der Hoff2020-03-301-23/+2
| | | | | | | | | | | | make sure we clear out all but one update for the user
| * | Transfer alias mappings when joining an upgraded room (#6946)Andrew Morgan2020-03-301-0/+3
| | |
| * | Merge pull request #7160 from ↵David Baker2020-03-302-3/+18
| |\ \ | | | | | | | | | | | | | | | | matrix-org/dbkr/always_send_own_device_list_updates Always send the user updates to their own device list
| | * | Add explanatory commentAndrew Morgan2020-03-302-1/+4
| | | |
| | * | blackDavid Baker2020-03-301-1/+3
| | | |
| | * | Just add own user ID to the list we track device changes forDavid Baker2020-03-302-7/+11
| | | |
| | * | Fix undefined variable & remove debug loggingDavid Baker2020-03-271-10/+2
| | | |
| | * | blackDavid Baker2020-03-271-4/+4
| | | |
| | * | Always send the user updates to their own device listDavid Baker2020-03-272-6/+20
| | | | | | | | | | | | | | | | | | | | This will allow clients to notify users about new devices even if the user isn't in any rooms (yet).
| * | | Add options to prevent users from changing their profile. (#7096)Dirk Klimpel2020-03-271-0/+16
| |/ /
| * | Merge pull request #7151 from matrix-org/jaywink/saml-redirect-fixJason Robinson2020-03-261-0/+4
| |\ \ | | | | | | | | Allow RedirectResponse in SAML response handler
| | * | Allow RedirectResponse in SAML response handlerJason Robinson2020-03-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow custom SAML handlers to redirect after processing an auth response. Fixes #7149 Signed-off-by: Jason Robinson <jasonr@matrix.org>
| * | | Refactor the CAS code (move the logic out of the REST layer to a handler) ↵Patrick Cloke2020-03-261-0/+204
| | | | | | | | | | | | | | | | (#7136)
| * | | Allow server admins to define and enforce a password policy (MSC2000). (#7118)Dirk Klimpel2020-03-262-0/+95
| |/ /
| * | Validate that the session is not modified during UI-Auth (#7068)Patrick Cloke2020-03-261-4/+33
| | |
| * | Clean up some LoggingContext stuff (#7120)Richard van der Hoff2020-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * | Use the proper error code when a canonical alias that does not exist is ↵Patrick Cloke2020-03-231-19/+38
| | | | | | | | | | | | used. (#7109)
| * | Remove concept of a non-limited stream. (#7011)Erik Johnston2020-03-202-4/+11
| |/
* | Fix sytest CIAndrew Morgan2020-05-282-2/+2
| | | | | | | | | | | | | | | | * Switch sytest-synapse to sytest-dinsic * Be sure to invalidate our caches properly! * Remove duplicate encryption state key definition * Remove old config option name in comment * Make dinsic the default in merge_base_branch
* | Query missing cross-signing keys on local sig upload (#7289)Andrew Morgan2020-05-281-9/+139
| |
* | Revert "Query missing cross-signing keys on local sig upload"Richard van der Hoff2020-05-281-129/+9
| | | | | | | | | | | | This was incorrectly merged to the release branch before it was ready. This reverts commit 72fe2affb6ac86d433b80b6452da57052365aa26.
* | Always send the user updates to their own device list (#7160)David Baker2020-05-282-3/+18
| |
* | Query missing cross-signing keys on local sig uploadAndrew Morgan2020-05-281-9/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add changelog Save retrieved keys to the db lint Fix and de-brittle remote result dict processing Use query_user_devices instead, assume only master, self_signing key types Make changelog more useful Remove very specific exception handling Wrap get_verify_key_from_cross_signing_key in a try/except Note that _get_e2e_cross_signing_verify_key can raise a SynapseError lint Add comment explaining why this is useful Only fetch master and self_signing key types Fix log statements, docstrings Remove extraneous items from remote query try/except lint Factor key retrieval out into a separate function Send device updates, modeled after SigningKeyEduUpdater._handle_signing_key_updates Update method docstring
* | Only register devices edu handler on the master process (#7255)Andrew Morgan2020-05-281-7/+11
| |
* | apply lintingAndrew Morgan2020-05-145-30/+23
| |
* | Disable _mark_expired_users_as_inactive bg job when account validity disabledAndrew Morgan2020-04-301-2/+4
| |
* | Ensure non-federated rooms are not shown for POST /publicRoomsAndrew Morgan2020-04-291-1/+5
| |
* | Simplify auto-bind email to IS hackAndrew Morgan2020-04-241-12/+6
| |
* | Remove protocol scheme from email delegateAndrew Morgan2020-04-241-1/+12
| | | | | | | | This is an update to the commit ef8e78c1e623db5df97c7401bc5af9960946915e
* | Remove bind_email param from dinsic-specific codeAndrew Morgan2020-04-241-1/+0
| |
* | HACK: Bind email to identity server when using it for 3pid delegationAndrew Morgan2020-04-241-1/+27
| |
* | Fix some broken referencesAndrew Morgan2020-04-241-4/+4
| |
* | Fix and refactor rewritten IS url feature. Add sample config docs (#40)Andrew Morgan2020-04-221-83/+72
| |
* | Consolidate id_server URL translationAndrew Morgan2020-04-202-35/+27
| |
* | Don't verify signatures using re-written id_server urlAndrew Morgan2020-04-171-8/+10
| |
* | Add an option to the set password API to choose whether to logout other ↵Andrew Morgan2020-03-241-16/+25
|\| | | | | | | | | | | | | devices. (#7085) * commit '88b41986d': Add an option to the set password API to choose whether to logout other devices. (#7085)
| * Add an option to the set password API to choose whether to logout other ↵Patrick Cloke2020-03-181-16/+25
| | | | | | | | devices. (#7085)
* | Remove special casing of `m.room.aliases` events (#7034)Andrew Morgan2020-03-241-15/+1
|\| | | | | | | | | * commit '60724c46b': Remove special casing of `m.room.aliases` events (#7034)
| * Remove special casing of `m.room.aliases` events (#7034)Patrick Cloke2020-03-171-15/+1
| |
* | Merge commit '6a3504636' into dinsic-release-v1.12.xAndrew Morgan2020-03-243-91/+110
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6a3504636': (29 commits) Revert "Add options to disable setting profile info for prevent changes. (#7053)" Populate the room version from state events (#7070) Fix buggy condition in account validity handler (#7074) Use innerText instead of innerHTML Add type annotations and comments to auth handler (#7063) Lint Put the file in the templates directory Update wording and config Changelog Move the default SAML2 error HTML to a dedicated file Refactor a bit Also don't fail on aliases events in this case Lint Changelog Also don't filter out events sent by ignored users when checking state visibility Fix condition Don't filter out dummy events when we're checking the visibility of state Update sample_config.yaml Update synapse/config/registration.py lint, fix tests ...
| * Revert "Add options to disable setting profile info for prevent changes. ↵Richard van der Hoff2020-03-171-16/+0
| | | | | | | | | | | | | | (#7053)" This reverts commit 54dd28621b070ca67de9f773fe9a89e1f4dc19da, reversing changes made to 6640460d054e8f4444046a34bdf638921b31c01e.
| * Fix buggy condition in account validity handler (#7074)Brendan Abolivier2020-03-161-1/+5
| |
| * Add type annotations and comments to auth handler (#7063)Patrick Cloke2020-03-121-89/+104
| |
| * Don't filter out dummy events when we're checking the visibility of stateBrendan Abolivier2020-03-111-1/+1
| |
| * Add options to disable setting profile info for prevent changes. (#7053)Brendan Abolivier2020-03-101-0/+16
| |\
| | * lint, fix testsdklimpel2020-03-091-1/+3
| | |
| | * updates after reviewdklimpel2020-03-091-4/+4
| | |
| | * lintdklimpel2020-03-081-4/+2
| | |
| | * changelogdklimpel2020-03-081-2/+8
| | |
| | * Add options to disable setting profile info for prevent changes.dklimpel2020-03-081-0/+10
| | |
* | | Merge pull request #7058 from matrix-org/babolivier/saml_error_htmlAndrew Morgan2020-03-241-1/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6640460d0': Rephrase default message Hopefully mypy is happy now Attempt at appeasing the gods of mypy Lint Changelog Update sample config SAML2: render a comprehensible error page if something goes wrong
| * | SAML2: render a comprehensible error page if something goes wrongBrendan Abolivier2020-03-101-1/+19
| | | | | | | | | | | | | | | | | | If an error happened while processing a SAML AuthN response, or a client ends up doing a `GET` request to `/authn_response`, then render a customisable error page rather than a confusing error.
* | | Merge pull request #7045 from matrix-org/babolivier/room_keys_checkAndrew Morgan2020-03-241-0/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'bbf725e7d': Lint Mention the session ID in the error message Lint Changelog Make sure that is_verified is a boolean when processing room keys
| * | LintBrendan Abolivier2020-03-061-2/+1
| | |
| * | Mention the session ID in the error messageBrendan Abolivier2020-03-061-2/+3
| | |
| * | LintBrendan Abolivier2020-03-061-1/+2
| | |
| * | Make sure that is_verified is a boolean when processing room keysBrendan Abolivier2020-03-061-0/+6
| | |
* | | Allow deleting an alias if the user has sufficient power level (#6986)Andrew Morgan2020-03-241-33/+74
|\| | | | | | | | | | | | | | * commit '13892776e': Allow deleting an alias if the user has sufficient power level (#6986)
| * | Allow deleting an alias if the user has sufficient power level (#6986)Patrick Cloke2020-03-041-33/+74
| | |
| * | Merge branch 'master' into developBrendan Abolivier2020-03-032-3/+76
| |\ \
* | \ \ v1.11.1Andrew Morgan2020-03-242-3/+76
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | Fix wrong handler being used in SAML handlerBrendan Abolivier2020-03-031-3/+2
| | | |
| * | | Factor out complete_sso_login and expose it to the Module APIBrendan Abolivier2020-03-031-0/+74
| | | |
* | | | Validate the alt_aliases property of canonical alias events (#6971)Andrew Morgan2020-03-242-10/+51
|\ \ \ \ | | |/ / | |/| | | | | | | | | | * 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-032-10/+51
| | |/ | |/|
* | | Store room version on invite (#6983)Andrew Morgan2020-03-241-0/+12
|\| | | | | | | | | | | | | | * commit '3e99528f2': Store room version on invite (#6983)
| * | Store room version on invite (#6983)Richard van der Hoff2020-02-261-0/+12
| | | | | | | | | | | | | | | When we get an invite over federation, store the room version in the rooms table. The general idea here is that, when we pull the invite out again, we'll want to know what room_version it belongs to (so that we can later redact it if need be). So we need to store it somewhere...
* | | Port PresenceHandler to async/await (#6991)Andrew Morgan2020-03-242-108/+89
|\| | | | | | | | | | | | | | * commit '1f773eec9': Port PresenceHandler to async/await (#6991)
| * | Port PresenceHandler to async/await (#6991)Erik Johnston2020-02-262-108/+89
| | |
* | | Remove redundant store_room call (#6979)Andrew Morgan2020-03-241-23/+0
|\| | | | | | | | | | | | | | * commit '691659568': Remove redundant store_room call (#6979)
| * | Remove redundant store_room call (#6979)Richard van der Hoff2020-02-241-23/+0
| | | | | | | | | | | | | | | `_process_received_pdu` is only called by `on_receive_pdu`, which ignores any events for unknown rooms, so this is redundant.
* | | Upsert room version when we join over federation (#6968)Andrew Morgan2020-03-241-10/+12
|\| | | | | | | | | | | | | | * commit 'a301934f4': Upsert room version when we join over federation (#6968)
| * | Upsert room version when we join over federation (#6968)Richard van der Hoff2020-02-241-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | This is intended as a precursor to storing room versions when we receive an invite over federation, but has the happy side-effect of fixing #3374 at last. In short: change the store_room with try/except to a proper upsert which updates the right columns.
* | | Change displayname of user as admin in rooms (#6876)Andrew Morgan2020-03-241-1/+11
|\| | | | | | | | | | | | | | * commit '7b0e2d961': Change displayname of user as admin in rooms (#6876)
| * | Change displayname of user as admin in rooms (#6876)Dirk Klimpel2020-02-211-1/+11
| | |
* | | Stop returning aliases as part of the room list. (#6970)Andrew Morgan2020-03-241-9/+0
|\| | | | | | | | | | | | | | | | | * commit 'fcf459948': Stop returning aliases as part of the room list. (#6970) Publishing/removing from the directory requires a power level greater than canonical aliases.
| * | Stop returning aliases as part of the room list. (#6970)Patrick Cloke2020-02-211-9/+0
| | |
* | | Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Andrew Morgan2020-03-249-35/+33
|\| | | | | | | | | | | | | | | | | | | | * 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-219-35/+33
| | | | | | | | | | | | Ensure good comprehension hygiene using flake8-comprehensions.
| * | Merge branch 'master' into developRichard van der Hoff2020-02-211-5/+5
| |\|
* | | Small grammar fixes to the ACME v1 deprecation notice (#6944)Andrew Morgan2020-03-241-5/+5
|\ \ \ | | |/ | |/| | | | | | | * commit '8f6d9c4cf': Small grammar fixes to the ACME v1 deprecation notice (#6944)
| * | Small grammar fixes to the ACME v1 deprecation notice (#6944)Andrew Morgan2020-02-211-5/+5
| | | | | | | | | Some small fixes to the copy in #6907.
* | | Do not send alias events when creating / upgrading a room (#6941)Andrew Morgan2020-03-242-40/+15
|\ \ \ | | |/ | |/| | | | | | | * commit '99eed85a7': Do not send alias events when creating / upgrading a room (#6941)
| * | Do not send alias events when creating / upgrading a room (#6941)Patrick Cloke2020-02-202-40/+15
| |/ | | | | Stop emitting room alias update events during room creation/upgrade.
* | Merge pull request #6949 from matrix-org/rav/list_room_aliases_peekableAndrew Morgan2020-03-245-33/+22
|\| | | | | | | | | | | | | | | * 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-195-33/+22
| |\ | | | | | | Make room alias lists peekable
| | * Make room alias lists peekableRichard van der Hoff2020-02-191-1/+3
| | | | | | | | | | | | | | | | | | As per https://github.com/matrix-org/matrix-doc/pull/2432#pullrequestreview-360566830, make room alias lists accessible to users outside world_readable rooms.
| | * Add `allow_departed_users` param to `check_in_room_or_world_readable`Richard van der Hoff2020-02-193-6/+14
| | | | | | | | | | | | | | | | | | | | | ... and set it everywhere it's called. while we're here, rename it for consistency with `check_user_in_room` (and to help check that I haven't missed any instances)
| | * Refactor the membership check methods in AuthRichard van der Hoff2020-02-182-28/+7
| | | | | | | | | | | | | | | these were getting a bit unwieldy, so let's combine `check_joined_room` and `check_user_was_in_room` into a single `check_user_in_room`.
* | | Merge pull request #6945 from matrix-org/babolivier/fix-retention-debug-logAndrew Morgan2020-03-241-1/+1
|\| | | | | | | | | | | | | | | | | | | | * commit '5e4a43855': Update changelog.d/6945.bugfix Changelog Fix log in message retention purge jobs
| * | Merge pull request #6945 from matrix-org/babolivier/fix-retention-debug-logBrendan Abolivier2020-02-191-1/+1
| |\ \ | | |/ | |/| Fix log in message retention purge jobs
| | * Fix log in message retention purge jobsBrendan Abolivier2020-02-181-1/+1
| | |
* | | Implement GET /_matrix/client/r0/rooms/{roomId}/aliases (#6939)Andrew Morgan2020-03-241-1/+16
|\| | | | | | | | | | | | | | * 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/+16
| | | | | | | | | | | | | | | per matrix-org/matrix-doc#2432