summary refs log tree commit diff
path: root/synapse/api (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6949 from matrix-org/rav/list_room_aliases_peekableAndrew Morgan2020-03-241-45/+49
|\ | | | | | | | | | | | | | | * 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
| * Add `allow_departed_users` param to `check_in_room_or_world_readable`Richard van der Hoff2020-02-191-3/+13
| | | | | | | | | | | | | | ... 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-181-43/+37
| | | | | | | | | | 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`.
* | Fix detecting unknown devices from remote encrypted events. (#6848)Andrew Morgan2020-03-231-2/+1
|\| | | | | | | | | * commit '6475382d8': Fix detecting unknown devices from remote encrypted events. (#6848)
| * Fix detecting unknown devices from remote encrypted events. (#6848)Erik Johnston2020-02-041-2/+1
| | | | | | | | | | | | | | | | We were looking at the wrong event type (`m.room.encryption` vs `m.room.encrypted`). Also fixup the duplicate `EvenTypes` entries. Introduced in #6776.
* | Merge pull request #6820 from matrix-org/rav/get_room_version_idAndrew Morgan2020-03-231-4/+2
|\| | | | | | | | | | | | | * commit '160522e32': newsfile Add `get_room_version` method s/get_room_version/get_room_version_id/
| * Add `get_room_version` methodRichard van der Hoff2020-01-311-4/+2
| | | | | | | | So that we can start factoring out some of this boilerplatey boilerplate.
* | Merge pull request #6787 from matrix-org/rav/msc2260Andrew Morgan2020-03-231-0/+16
|\| | | | | | | | | | | | | | | * commit 'cc109b79d': fix bad variable ref update changelog changelog Implement updated auth rules from MSC2260
| * Implement updated auth rules from MSC2260Richard van der Hoff2020-01-281-0/+16
| |
* | Pass room version object into event_auth.check and check_redaction (#6788)Andrew Morgan2020-03-231-2/+5
|\| | | | | | | | | * commit 'a8ce7aeb4': Pass room version object into event_auth.check and check_redaction (#6788)
| * Pass room version object into event_auth.check and check_redaction (#6788)Richard van der Hoff2020-01-281-2/+5
| | | | | | | | | | | | | | These are easier to work with than the strings and we normally have one around. This fixes `FederationHander._persist_auth_tree` which was passing a RoomVersion object into event_auth.check instead of a string.
* | Fixup synapse.api to pass mypy (#6733)Andrew Morgan2020-03-232-3/+8
|\| | | | | | | | | * commit '0f6e525be': Fixup synapse.api to pass mypy (#6733)
| * Fixup synapse.api to pass mypy (#6733)Erik Johnston2020-01-202-3/+8
| |
* | Add StateMap type alias (#6715)Andrew Morgan2020-03-231-6/+2
|\| | | | | | | | | * commit 'd386f2f33': Add StateMap type alias (#6715)
| * Add StateMap type alias (#6715)Erik Johnston2020-01-161-6/+2
| |
* | Implement RedirectException (#6687)Andrew Morgan2020-03-231-1/+26
|\| | | | | | | | | * commit '8f5d7302a': Implement RedirectException (#6687)
| * Implement RedirectException (#6687)Richard van der Hoff2020-01-151-1/+26
| | | | | | | | | | Allow REST endpoint implemnentations to raise a RedirectException, which will redirect the user's browser to a given location.
* | Kill off RegistrationError (#6691)Andrew Morgan2020-03-231-6/+0
|\| | | | | | | | | * commit '326c893d2': Kill off RegistrationError (#6691)
| * Kill off RegistrationError (#6691)Richard van der Hoff2020-01-131-6/+0
| | | | | | This is pretty pointless. Let's just use SynapseError.
* | Remove unused, undocumented "content repo" resource (#6628)Andrew Morgan2020-03-201-1/+0
|\| | | | | | | | | * commit '98247c4a0': Remove unused, undocumented "content repo" resource (#6628)
| * Remove unused, undocumented "content repo" resource (#6628)Richard van der Hoff2020-01-031-1/+0
| | | | | | | | | | | | This looks like it got half-killed back in #888. Fixes #6567.
* | Change EventContext to use the Storage class (#6564)Andrew Morgan2020-03-201-1/+1
|\| | | | | | | | | * commit 'fa780e972': Change EventContext to use the Storage class (#6564)
| * Change EventContext to use the Storage class (#6564)Erik Johnston2019-12-201-1/+1
| |
* | Add auth events as per spec. (#6556)Andrew Morgan2020-03-191-67/+34
|\| | | | | | | | | * commit '3fbe5b7ec': Add auth events as per spec. (#6556)
| * Add auth events as per spec. (#6556)Erik Johnston2019-12-161-67/+34
| | | | | | | | | | Previously we tried to be clever and filter out some unnecessary event IDs to keep the auth chain small, but that had some annoying interactions with state res v2 so we stop doing that for now.
* | Merge pull request #6329 from matrix-org/babolivier/context_filtersAndrew Morgan2020-03-192-1/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-042-1/+5
| |\ | | | | | | Filter state, events_before and events_after in /context requests
| | * Merge branch 'develop' into babolivier/context_filtersBrendan Abolivier2019-12-042-1/+3
| | |\
| | * | Update copyrightsBrendan Abolivier2019-11-052-1/+5
| | | |
* | | | Add ephemeral messages support (MSC2228) (#6409)Andrew Morgan2020-03-191-0/+4
|\| | | | | | | | | | | | | | | | | | | * commit '54dd5dc12': Add ephemeral messages support (MSC2228) (#6409)
| * | | Add ephemeral messages support (MSC2228) (#6409)Brendan Abolivier2019-12-031-0/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | Implement part [MSC2228](https://github.com/matrix-org/matrix-doc/pull/2228). The parts that differ are: * the feature is hidden behind a configuration flag (`enable_ephemeral_messages`) * self-destruction doesn't happen for state events * only implement support for the `m.self_destruct_after` field (not the `m.self_destruct` one) * doesn't send synthetic redactions to clients because for this specific case we consider the clients to be able to destroy an event themselves, instead we just censor it (by pruning its JSON) in the database
| * | Merge branch 'develop' into babolivier/message_retentionBrendan Abolivier2019-11-261-1/+1
| |\ \
| * | | Implement per-room message retention policiesBrendan Abolivier2019-11-041-0/+2
| | |/ | |/|
* | | Replace instance variations of homeserver with correct case/spacing (#6357)Andrew Morgan2020-03-181-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | * commit '6e1b40dc2': sample config Add changelog A couple more instances Replace instance variations of homeserver with correct case/spacing
| * | Replace instance variations of homeserver with correct case/spacingAndrew Morgan2019-11-121-1/+1
| |/
* | Merge pull request #6301 from matrix-org/babolivier/msc2326Andrew Morgan2020-03-162-2/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f496d2587': Incorporate review Factor out an _AsyncEventContextImpl (#6298) Update synapse/storage/data_stores/main/schema/delta/56/event_labels.sql Add more data to the event_labels table and fix the indexes Add unstable feature flag Lint Incorporate review Lint Changelog Add integration tests for /messages Add more integration testing Add integration tests for sync Add unit tests Add index on label Implement filtering Store labels for new events Add database table for keeping track of labels on events
| * Merge pull request #6301 from matrix-org/babolivier/msc2326Brendan Abolivier2019-11-012-2/+20
| |\ | | | | | | Implement MSC2326 (label based filtering)
| | * Incorporate reviewBrendan Abolivier2019-11-012-2/+2
| | |
| | * LintBrendan Abolivier2019-11-011-0/+1
| | |
| | * Incorporate reviewBrendan Abolivier2019-11-012-3/+8
| | |
| | * Add unit testsBrendan Abolivier2019-10-301-1/+1
| | |
| | * Implement filteringBrendan Abolivier2019-10-301-2/+11
| | |
| | * Store labels for new eventsBrendan Abolivier2019-10-301-0/+3
| | |
* | | Remove usage of deprecated logger.warn method from codebase (#6271)Andrew Morgan2020-03-161-1/+1
|\| |
| * | Remove usage of deprecated logger.warn method from codebase (#6271)Andrew Morgan2019-10-311-1/+1
| |/ | | | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
* | Option to suppress resource exceeded alerting (#6173)Andrew Morgan2020-03-162-3/+16
|\| | | | | | | | | * commit '2794b7905': Option to suppress resource exceeded alerting (#6173)
| * Option to suppress resource exceeded alerting (#6173)Neil Johnson2019-10-242-3/+16
| | | | | | | | The expected use case is to suppress MAU limiting on small instances
* | Remove Auth.check method (#6217)Andrew Morgan2020-03-162-18/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '93eaeec75': Remove Auth.check method (#6217) add note about database upgrade use the right function for when we're already in runInteraction add user signature stream change cache to slaved device store black use stream ID generator instead of timestamp make isort happy apply PR review suggestions fix formatting add changelog make changes from PR review don't need to return the hidden column any more really fix queries to work with Postgres PostgreSQL, Y U no like? remove extra SQL query param add changelog file apply changes from PR review allow uploading keys for cross-signing allow devices to be marked as "hidden"
| * Remove Auth.check method (#6217)Richard van der Hoff2019-10-181-18/+1
| | | | | | This method was somewhat redundant, and confusing.
| * Merge branch 'uhoreg/e2e_cross-signing_merged' into developHubert Chathi2019-10-181-0/+1
| |\
| | * Merge branch 'develop' into uhoreg/e2e_cross-signing_mergedHubert Chathi2019-10-183-5/+18
| | |\
| | * \ Merge branch 'develop' into cross-signing_keysHubert Chathi2019-09-041-8/+7
| | |\ \
| | * \ \ Merge branch 'uhoreg/e2e_cross-signing_merged' into cross-signing_keysHubert Chathi2019-08-283-2/+8
| | |\ \ \
| | * \ \ \ Merge branch 'cross-signing_hidden' into cross-signing_keysHubert Chathi2019-08-012-48/+26
| | |\ \ \ \
| | * | | | | allow uploading keys for cross-signingHubert Chathi2019-07-251-0/+1
| | | | | | |
* | | | | | | Merge pull request #6214 from matrix-org/rav/event_auth/1Andrew Morgan2020-03-161-2/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '47ada4dff': changelog rip out some unreachable code Remove dead check_auth script
| * | | | | | rip out some unreachable codeRichard van der Hoff2019-10-171-2/+0
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | The only possible rejection reason is AUTH_ERROR, so all of this is unreachable.
* | | | | | Fix up some typechecking (#6150)Andrew Morgan2020-02-262-2/+6
|\| | | | |
| * | | | | Fix up some typechecking (#6150)Amber Brown2019-10-022-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * type checking fixes * changelog
* | | | | | Merge pull request #6108 from matrix-org/erikj/remove_get_user_by_req-spanAndrew Morgan2020-02-251-1/+3
|\| | | | |
| * | | | | Add device and appservice tagsErik Johnston2019-09-251-0/+3
| | | | | |
| * | | | | Don't create new span for get_user_by_reqErik Johnston2019-09-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't actually care about what happens in `get_user_by_req` and having it as a separate span means that the entity tag isn't added to the servlet spans, making it harder to search.
* | | | | | Merge pull request #6020 from matrix-org/jaywink/allow-support-users-to-registerAndrew Morgan2020-02-251-2/+9
|\| | | | |
| * | | | | Ensure support users can be registered even if MAU limit is reachedJason Robinson2019-09-111-2/+9
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows support users to be created even on MAU limits via the admin API. Support users are excluded from MAU after creation, so it makes sense to exclude them in creation - except if the whole host is in disabled state. Signed-off-by: Jason Robinson <jasonr@matrix.org>
* | | | | Remove double return statements (#5962)Andrew Morgan2020-02-251-1/+0
|\| | | |
| * | | | Remove double return statements (#5962)Andrew Morgan2019-09-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove all the "double return" statements which were a result of us removing all the instances of ``` defer.returnValue(...) return ``` statements when we switched to python3 fully.
* | | | | Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2020-02-241-7/+7
|\| | | |
| * | | | Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-301-7/+7
| | |_|/ | |/| | | | | | | | | | | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :)
* | | | Merge pull request #5902 from matrix-org/hs/exempt-support-users-from-consentAndrew Morgan2020-02-241-1/+2
|\| | |
| * | | Add bot typeHalf-Shot2019-08-231-1/+2
| | | |
* | | | Opentracing misc (#5856)Andrew Morgan2020-02-201-0/+4
|\| | |
| * | | Opentracing misc (#5856)Jorik Schellekens2019-08-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add authenticated_entity and servlet_names tags. Functionally: - Add a tag for authenticated_entity - Add a tag for servlet_names Stylistically: Moved to importing methods directly from opentracing.
* | | | Change user deactivated errcode to USER_DEACTIVATED and use it (#5686)Andrew Morgan2020-02-201-1/+2
|\| | |
| * | | Change user deactivated errcode to USER_DEACTIVATED and use it (#5686)Andrew Morgan2019-07-311-1/+2
| | |/ | |/| | | | | | | | | | This is intended as an amendment to #5674 as using M_UNKNOWN as the errcode makes it hard for clients to differentiate between an invalid password and a deactivated user (the problem we were trying to solve in the first place). M_UNKNOWN was originally chosen as it was presumed than an MSC would have to be carried out to add a new code, but as Synapse often is the testing bed for new MSC implementations, it makes sense to try it out first in the wild and then add it into the spec if it is successful. Thus this PR return a new M_USER_DEACTIVATED code when a deactivated user attempts to login.
* | | Remove non-functional 'expire_access_token' setting (#5782)Andrew Morgan2020-02-201-23/+5
|\| |
| * | Remove non-functional 'expire_access_token' setting (#5782)Richard van der Hoff2019-07-301-23/+5
| | | | | | | | | | | | | | | | | | | | | | | | The `expire_access_token` didn't do what it sounded like it should do. What it actually did was make Synapse enforce the 'time' caveat on macaroons used as access tokens, but since our access token macaroons never contained such a caveat, it was always a no-op. (The code to add 'time' caveats was removed back in v0.18.5, in #1656)
* | | Replace returnValue with return (#5736)Andrew Morgan2020-02-192-20/+16
|\| |
| * | Replace returnValue with return (#5736)Amber Brown2019-07-232-25/+21
| |/
* | Ignore redactions of m.room.create events (#5701)Andrew Morgan2020-02-191-15/+0
|\|
| * Ignore redactions of m.room.create events (#5701)Richard van der Hoff2019-07-171-15/+0
| |
* | Return a different error from Invalid Password when a user is deactivated ↵Andrew Morgan2020-02-171-0/+16
|\| | | | | | | (#5674)
| * Return a different error from Invalid Password when a user is deactivated ↵Andrew Morgan2019-07-151-0/+16
| | | | | | | | | | (#5674) Return `This account has been deactivated` instead of `Invalid password` when a user is deactivated.
* | Implement access token expiry (#5660)Andrew Morgan2020-02-172-1/+19
|\|
| * Implement access token expiry (#5660)Richard van der Hoff2019-07-122-1/+19
| | | | | | | | Record how long an access token is valid for, and raise a soft-logout once it expires.
* | Clean up exception handling for access_tokens (#5656)Andrew Morgan2020-02-172-82/+71
|\|
| * Clean up exception handling for access_tokens (#5656)Richard van der Hoff2019-07-112-89/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First of all, let's get rid of `TOKEN_NOT_FOUND_HTTP_STATUS`. It was a hack we did at one point when it was possible to return either a 403 or a 401 if the creds were missing. We always return a 401 in these cases now (thankfully), so it's not needed. Let's also stop abusing `AuthError` for these cases. Honestly they have nothing that relates them to the other places that `AuthError` is used, other than the fact that they are loosely under the 'Auth' banner. It makes no sense for them to share exception classes. Instead, let's add a couple of new exception classes: `InvalidClientTokenError` and `MissingClientTokenError`, for the `M_UNKNOWN_TOKEN` and `M_MISSING_TOKEN` cases respectively - and an `InvalidClientCredentialsError` base class for the two of them.
* | Run Black. (#5482)Andrew Morgan2020-02-132-23/+23
|\|
| * Run Black. (#5482)Amber Brown2019-06-207-337/+231
| |
| * Merge pull request #5363 from ↵Brendan Abolivier2019-06-101-2/+13
| |\ | | | | | | | | | | | | matrix-org/babolivier/account_validity_send_mail_auth Don't check whether the user's account is expired on /send_mail requests
* | | Dinsic Blacking with black==18.6b2Andrew Morgan2020-02-117-317/+212
| | |
* | | Implement per-room message retention policiesBrendan Abolivier2019-08-281-0/+2
| | |
* | | Merge branch 'master' into dinsicBrendan Abolivier2019-06-124-11/+24
|\| |
| * | Add ability to perform password reset via email without trusting the ↵Andrew Morgan2019-06-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | identity server (#5377) Sends password reset emails from the homeserver instead of proxying to the identity server. This is now the default behaviour for security reasons. If you wish to continue proxying password reset requests to the identity server you must now enable the email.trust_identity_server_for_password_resets option. This PR is a culmination of 3 smaller PRs which have each been separately reviewed: * #5308 * #5345 * #5368
| * | Implement room v5 which enforces signing key validityRichard van der Hoff2019-06-051-5/+5
| | | | | | | | | | | | | | | Implements [MSC2077](https://github.com/matrix-org/matrix-doc/pull/2077) and fixes #5247 and #4364.
| * | Add a test room version where we enforce key validity (#5348)Richard van der Hoff2019-06-051-7/+13
| | |
| * | Implement the SHHS complexity API (#5216)Amber Brown2019-05-301-0/+1
| | |
| * | Add config option for setting homeserver's default room version (#5223)Andrew Morgan2019-05-231-4/+0
| | | | | | | | | | | | | | | Replaces DEFAULT_ROOM_VERSION constant with a method that first checks the config, then returns a hardcoded value if the option is not present. That hardcoded value is now located in the server.py config file.
| * | Room Statistics (#4338)Amber Brown2019-05-211-0/+1
| | |
* | | Merge branch 'master' into dinsicBrendan Abolivier2019-06-113-3/+37
|\| |
| * | Introduce room v4 which updates event ID format. (#5217)Richard van der Hoff2019-05-211-4/+4
| | | | | | | | | Implements https://github.com/matrix-org/matrix-doc/pull/2002.
| * | Fix error handling for rooms whose versions are unknown. (#5219)Richard van der Hoff2019-05-211-1/+15
| | | | | | | | | | | | | | | | | | | | | If we remove support for a particular room version, we should behave more gracefully. This should make client requests fail with a 400 rather than a 500, and will ignore individiual PDUs in a federation transaction, rather than the whole transaction.
| * | Add a test room version which updates event ID format (#5210)Richard van der Hoff2019-05-201-2/+11
| | | | | | | | | Implements MSC1884
| * | Rename relation types to match MSCErik Johnston2019-05-201-2/+2
| | |
| * | Merge pull request #5209 from matrix-org/erikj/reactions_baseErik Johnston2019-05-201-0/+8
| |\ \ | | | | | | | | Land basic reaction and edit support.
| | * | Add simple send_relation API and track in DBErik Johnston2019-05-151-0/+8
| | | |
| * | | Limit UserIds to a length that fits in a state key (#5198)ReidAnderson2019-05-201-0/+3
| | | |
* | | | Merge branch 'babolivier/account_validity_send_mail_auth' into dinsic dinsic_2019-06-10Brendan Abolivier2019-06-101-2/+13
|\ \ \ \ | | |_|/ | |/| |
| * | | Better wordingBrendan Abolivier2019-06-101-1/+1
| | | |
| * | | DocBrendan Abolivier2019-06-101-0/+5
| | | |
| * | | Don't check whether the user's account is expired on /send_mail requestsBrendan Abolivier2019-06-051-2/+8
| |/ /
* | | Merge pull request #5214 from matrix-org/babolivier/password-policyBrendan Abolivier2019-05-221-1/+25
|\ \ \ | | | | | | | | Allow server admins to define and enforce a password policy (MSC2000)
| * | | Make error messages more explicitBrendan Abolivier2019-05-211-2/+6
| | | |
| * | | First implementation of MSC2000Brendan Abolivier2019-05-201-1/+21
| |/ /
* | | Merge branch 'babolivier/per_room_profiles' into dinsic dinsic_2019-05-17Brendan Abolivier2019-05-171-2/+1
|\| |
| * | Drop support for v2_alpha API prefix (#5190)Richard van der Hoff2019-05-151-2/+1
| |/
* | Merge branch 'release-v0.99.4' into dinsic dinsic_2019-05-14Brendan Abolivier2019-05-142-3/+7
|\|
| * Do checks on aliases for incoming m.room.aliases events (#5128)Brendan Abolivier2019-05-081-0/+3
| | | | | | | | | | Follow-up to #5124 Also added a bunch of checks to make sure everything (both the stuff added on #5124 and this PR) works as intended.
| * Factor out an "assert_requester_is_admin" function (#5120)Richard van der Hoff2019-05-021-1/+1
| | | | | | | | Rather than copying-and-pasting the same four lines hundreds of times
| * Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-04-174-43/+95
| |\ | | | | | | | | | babolivier/account_expiration
| | * Merge pull request #5047 from matrix-org/babolivier/account_expirationBrendan Abolivier2019-04-171-2/+3
| | |\ | | | | | | | | Send out emails with links to extend an account's validity period
| * | | Add management endpoints for account validityBrendan Abolivier2019-04-171-1/+1
| | |/ | |/|
| * | Send out emails with links to extend an account's validity periodBrendan Abolivier2019-04-171-2/+3
| | |
* | | Move lookup endpoint to CS API (and s/is_server/id_server/)Brendan Abolivier2019-04-301-1/+0
| | |
* | | [DINSIC] Add ability to proxy identity lookups (#5048)Andrew Morgan2019-04-161-0/+1
| | |
* | | Merge branch 'develop' into dinsicAndrew Morgan2019-04-155-42/+107
|\ \ \ | | |/ | |/|
| * | Remove periods from copyright headers (#5046)Andrew Morgan2019-04-113-3/+3
| | |
| * | Merge pull request #5027 from matrix-org/babolivier/account_expirationBrendan Abolivier2019-04-092-0/+13
| |\| | | | | | | Add time-based account expiration
| | * Add account expiration featureBrendan Abolivier2019-04-092-0/+13
| | |
| * | Transfer related groups on room upgrade (#4990)Andrew Morgan2019-04-021-0/+1
| | | | | | | | | Transfers the m.room.related_groups state event on room upgrade.
| * | Collect room-version variations into one place (#4969)Richard van der Hoff2019-04-012-40/+91
| |/ | | | | | | Collect all the things that make room-versions different to one another into one place, so that it's easier to define new room versions.
* | Merge branch 'master' of github.com:matrix-org/synapse into dinsicErik Johnston2019-04-051-11/+11
|\|
| * Support 3PID login in password providers (#4931)Andrew Morgan2019-03-261-11/+11
| | | | | | | | | | Adds a new method, check_3pid_auth, which gives password providers the chance to allow authentication with third-party identifiers such as email or msisdn.
* | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/dinsic-mergedErik Johnston2019-03-212-18/+33
|\|
| * Enforce hs_disabled_message correctlyRichard van der Hoff2019-03-191-3/+5
| | | | | | | | | | Fixes a bug where hs_disabled_message was not enforced for 3pid-based requests if there was no server_notices_mxid configured.
| * Add ratelimiting on login (#4821)Brendan Abolivier2019-03-151-0/+12
| | | | | | Add two ratelimiters on login (per-IP address and per-userID).
| * Add rate-limiting on registration (#4735)Brendan Abolivier2019-03-051-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rate-limiting for registration * Add unit test for registration rate limiting * Add config parameters for rate limiting on auth endpoints * Doc * Fix doc of rate limiting function Co-Authored-By: babolivier <contact@brendanabolivier.com> * Incorporate review * Fix config parsing * Fix linting errors * Set default config for auth rate limiting * Fix tests * Add changelog * Advance reactor instead of mocked clock * Move parameters to registration specific config and give them more sensible default values * Remove unused config options * Don't mock the rate limiter un MAU tests * Rename _register_with_store into register_with_store * Make CI happy * Remove unused import * Update sample config * Fix ratelimiting test for py2 * Add non-guest test
* | FixupsErik Johnston2019-03-151-0/+6
| |
* | Merge branch 'master' of github.com:matrix-org/synapse into ↵Erik Johnston2019-03-155-75/+151
|\| | | | | | | erikj/dinsic-merged-master
| * Merge remote-tracking branch 'origin/release-v0.99.0' into developRichard van der Hoff2019-01-301-1/+1
| |\
| | * Update constants.pyNeil Johnson2019-01-301-1/+1
| | | | | | | | | remove trailing ,
| * | by default include m.room.encryption on invites (#3902)Matthew Hodgson2019-01-301-0/+1
| |/ | | | | | | | | | | | | | | * by default include m.room.encryption on invites * fix constant * changelog
| * Merge branch 'develop' into neilj/room_capabilitiesNeil Johnson2019-01-303-20/+43
| |\
| | * Enable room version v3Erik Johnston2019-01-291-1/+2
| | |
| | * Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-01-292-12/+3
| | |\ | | | | | | | | | | | | erikj/redactions_eiah
| | | * Implement event format v2Erik Johnston2019-01-291-0/+2
| | | |
| | | * Remove dead functionErik Johnston2019-01-291-11/+0
| | | |
| | | * Replace usage of builder.user_id with builder.senderErik Johnston2019-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | `.user_id` is proxed to `.sender` in FrozenEvent, so this has no functional change
| | * | Drop vdh supportErik Johnston2019-01-291-2/+0
| | | |
| | * | Finish comment...Erik Johnston2019-01-291-1/+1
| | | |
| | * | Implement rechecking of redactionsErik Johnston2019-01-291-2/+2
| | | |
| | * | Add RoomVersions.V3 constant, without enabling itErik Johnston2019-01-291-0/+1
| | |/ | | | | | | | | | | | | | | | We add the constant, but don't add it to the known room versions. This lets us start adding V3 logic, but the servers will never join or create V3 rooms
| | * Pass through room version to event authErik Johnston2019-01-251-4/+10
| | |
| | * Merge pull request #4415 from matrix-org/anoa/full_search_upgraded_roomsAndrew Morgan2019-01-251-0/+14
| | |\ | | | | | | | | Ability to search entire room history after upgrading room
| | | * Update synapse/api/filtering.pyRichard van der Hoff2019-01-241-1/+1
| | | | | | | | | | | | Co-Authored-By: anoadragon453 <1342360+anoadragon453@users.noreply.github.com>
| | | * Ensure new filter is actually createdAndrew Morgan2019-01-221-1/+1
| | | |
| | | * Fix a bug with single-room search searching all roomsAndrew Morgan2019-01-221-2/+13
| | | | | | | | | | | | | | | | | | | | * Create a new method for getting predecessor rooms * Remove formatting change
| | | * Search for messages across predecessor roomsAndrew Morgan2019-01-181-0/+3
| | | | | | | | | | | | | | | | Signed-off-by: Andrew Morgan <andrew@amorgan.xyz>
| | * | Merge pull request #4437 from matrix-org/erikj/event_format_version_v2Erik Johnston2019-01-241-0/+13
| | |\ \ | | | | | | | | | | Add support for persisting event format versions
| | | * | Add support for persisting event format versionsErik Johnston2019-01-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we only have the one event format version defined, but this adds the necessary infrastructure to persist and fetch the format versions alongside the events. We specify the format version rather than the room version as: 1. We don't necessarily know the room version, existing events may be either v1 or v2. 2. We'd need to be careful to prevent/handle correctly if different events in the same room reported to be of different versions, which sounds annoying.
| * | | | define room dispositions for use in exposing room capabilitiesNeil Johnson2019-01-301-0/+5
| | | | |
| * | | | reflect that rooms v3 is a stable room versionNeil Johnson2019-01-301-0/+1
| | | | |
| * | | | backout v3Neil Johnson2019-01-251-1/+0
| | | | |
| * | | | track unstable room v3Neil Johnson2019-01-251-0/+2
| |/ / /
| * / / Fix None guard in config.server.is_threepid_reservedNeil Johnson2019-01-221-1/+3
| |/ /
| * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-01-211-1/+2
| |\ \ | | | | | | | | | | | | erikj/fed_v2_invite_server
| | * \ Merge pull request #4390 from matrix-org/erikj/versioned_fed_apisErik Johnston2019-01-211-1/+2
| | |\ \ | | | | | | | | | | Add groundwork for new versions of federation APIs
| | * | | Migrate encryption state on room upgrade (#4411)Andrew Morgan2019-01-211-0/+1
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | * Migrate encryption state on room upgrade Signed-off-by: Andrew Morgan <andrew@amorgan.xyz> * Add changelog file
| | * | ALL_USER_TYPES should be a tupleNeil Johnson2019-01-151-1/+1
| | | |
| * | | Add /v2/invite federation APIErik Johnston2019-01-151-0/+1
| | |/ | |/|
| * | Add groundwork for new versions of federation APIsErik Johnston2019-01-151-1/+2
| |/
| * Merge branch rav/macaroon_key_fix_0.34 into rav/macaroon_key_fix_0.34.1Richard van der Hoff2019-01-101-38/+27
| |\ | | | | | | | | | Fixes #4371
| | * Merge branch 'rav/macaroon_key_fix' into rav/macaroon_key_fix_0.34Richard van der Hoff2019-01-101-38/+27
| | |\
| | | * Skip macaroon check for access tokens in the dbRichard van der Hoff2019-01-101-38/+27
| | | |
| * | | Refactor request sending to have better excpetions (#4358)Erik Johnston2019-01-081-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correctly retry and back off if we get a HTTPerror response * Refactor request sending to have better excpetions MatrixFederationHttpClient blindly reraised exceptions to the caller without differentiating "expected" failures (e.g. connection timeouts etc) versus more severe problems (e.g. programming errors). This commit adds a RequestSendFailed exception that is raised when "expected" failures happen, allowing the TransactionQueue to log them as warnings while allowing us to log other exceptions as actual exceptions.
| * | | fix the check for whether `is_url` to match all the other ones in codebase ↵Michael Telatynski2019-01-061-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | (#3405) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
| * | | Merge pull request #4307 from matrix-org/erikj/v2_roomsRichard van der Hoff2018-12-241-0/+2
| |\ \ \ | | | | | | | | | | Add v2 room version
| | * | | Add v2 room versionErik Johnston2018-12-181-0/+2
| | | | |
| * | | | create support user (#4141)Neil Johnson2018-12-142-2/+11
| | |/ / | |/| | | | | | | | | | | | | | | | | | Allow for the creation of a support user. A support user can access the server, join rooms, interact with other users, but does not appear in the user directory nor does it contribute to monthly active user limits.
| * | | Add an option to enable recording IPs for appservice users (#3831)Travis Ralston2018-12-041-9/+20
| |/ /
| * | Merge pull request #4004 from matrix-org/travis/login-termsTravis Ralston2018-11-011-0/+1
| |\ \ | | | | | | | | Add m.login.terms to the registration flow
| | * \ Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-312-1/+1
| | |\ \
| | * \ \ Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-241-1/+4
| | |\ \ \
| | * \ \ \ Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-151-0/+15
| | |\ \ \ \
| | * | | | | Incorporate Dave's work for GDPR login flowsTravis Ralston2018-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | As per https://github.com/vector-im/riot-web/issues/7168#issuecomment-419996117
| * | | | | | Add STATE_V2_TEST room versionErik Johnston2018-11-011-1/+6
| | |_|_|/ / | |/| | | |
| * | | | | Remove deprecated v1 key exchange endpoint (#4119)Amber Brown2018-10-311-1/+0
| | | | | |
| * | | | | Basic initial support for room upgradesRichard van der Hoff2018-10-251-0/+1
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | Currently just creates a new, empty, room, and sends a tombstone in the old room.
* | | | | Synchronise account metadata onto another server. (#4145) dinsic_2019-01-11Matthew Hodgson2019-01-111-29/+16
| | | | | | | | | | | | | | | | | | | | | | | | | * implement shadow registration via AS (untested) * shadow support for 3pid binding/unbinding (untested)
* | | | | merge master into dinsic, again...Matthew Hodgson2018-11-035-17/+68
|\| | | |
| * | | | Allow backslashes in event field filtersRichard van der Hoff2018-10-241-1/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a bug introduced in https://github.com/matrix-org/synapse/pull/1783 which meant that single backslashes were not allowed in event field filters. The intention here is to allow single-backslashes, but disallow double-backslashes.
| * | | PR feedback pt. 1David Baker2018-10-121-8/+0
| | | |
| * | | Fix mergefailDavid Baker2018-10-091-1/+1
| | | |
| * | | Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backupsDavid Baker2018-10-094-9/+23
| |\| |
| | * | Fix userconsent on Python 3 (#3938)Amber Brown2018-10-021-1/+1
| | | |
| | * | Replaced all occurences of e.message with str(e)Schnuffle2018-09-271-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Schnuffle <schnuffle@github.com>
| | * | Implement 'event_format' filter param in /syncRichard van der Hoff2018-09-041-0/+1
| | | | | | | | | | | | | | | | | | | | This has been specced and part-implemented; let's implement it for /sync (but no other endpoints yet :/).
| | * | assert rather than warn hhs-4Neil Johnson2018-08-311-3/+2
| | | |
| | * | move threepid checker to config, add missing yieldsNeil Johnson2018-08-311-2/+11
| | | |
| | * | fix reference to is_threepid_reservedNeil Johnson2018-08-311-1/+1
| | | |
| | * | ensure post registration auth checks do not fail erroneouslyNeil Johnson2018-08-311-5/+2
| | | |
| | * | fix bug where preserved threepid user comes to sign up and server is mau blockedNeil Johnson2018-08-311-1/+9
| | | |
| | * | Change admin_uri to admin_contact in config and errorsErik Johnston2018-08-242-5/+5
| | | |
| * | | try to make flake8 and isort happyHubert Chathi2018-09-061-0/+1
| | | |
| * | | Merge branch 'develop' into e2e_backupsHubert Chathi2018-08-244-12/+113
| |\| |
| | * | Implement trail usersErik Johnston2018-08-231-1/+5
| | | |
| | * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-08-223-11/+15
| | |\ \ | | | | | | | | | | | | | | | neilj/server_notices_on_blocking
| | | * \ Merge pull request #3673 from matrix-org/erikj/refactor_state_handlerErik Johnston2018-08-221-2/+7
| | | |\ \ | | | | | | | | | | | | Refactor state module to support multiple room versions
| | | | * \ Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-08-202-8/+48
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | erikj/refactor_state_handler
| | | | * | | Add constants for room versionsErik Johnston2018-08-091-2/+7
| | | | | | |
| | * | | | | Update notice formatErik Johnston2018-08-221-2/+4
| | | | | | |
| | * | | | | rename error codeNeil Johnson2018-08-182-4/+4
| | | | | | |
| | * | | | | special case server_notices_mxidNeil Johnson2018-08-181-0/+6
| | | | | | |
| | * | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Neil Johnson2018-08-172-6/+28
| | |\ \ \ \ \ | | | | |_|/ / | | | |/| | | | | | | | | | neilj/server_notices_on_blocking
| | * | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Neil Johnson2018-08-171-1/+1
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | neilj/server_notices_on_blocking
| | * \ \ \ \ \ Merge branch 'develop' of github.com:matrix-org/synapse into ↵Neil Johnson2018-08-152-9/+18
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | neilj/server_notices_on_blocking
| | * | | | | | | add new event typesNeil Johnson2018-08-151-0/+1
| | | | | | | | |
| | * | | | | | | support server notice state events for resource limitsNeil Johnson2018-08-141-0/+2
| | | | | | | | |
| * | | | | | | | blindly incorporate PR review - needs testing & fixingMatthew Hodgson2018-08-121-3/+8
| | | | | | | | |
| * | | | | | | | implement /room_keys/version too (untested)Matthew Hodgson2018-08-121-0/+25
| | |_|_|_|_|_|/ | |/| | | | | |
* | | | | | | | merge in masterMatthew Hodgson2018-10-225-66/+210
|\ \ \ \ \ \ \ \ | | |_|_|_|_|/ / | |/| | | | | |
| * | | | | | | Port over enough to get some sytests running on Python 3 (#3668)Amber Brown2018-08-202-8/+8
| | |_|_|_|/ / | |/| | | | |
| * | | | | | Merge branch 'develop' into neilj/limit_exceeded_errorNeil Johnson2018-08-171-1/+2
| |\ \ \ \ \ \ | | | |_|_|/ / | | |/| | | |
| | * | | | | call reap on start up and fix under reaping bugNeil Johnson2018-08-161-1/+1
| | | |_|/ / | | |/| | |
| * / | | | add new error type ResourceLimitNeil Johnson2018-08-162-6/+27
| |/ / / /
| * | | | clean up AuthErrorNeil Johnson2018-08-151-7/+3
| | | | |
| * | | | update error codes for resource limitingNeil Johnson2018-08-151-2/+1
| | | | |
| * | | | replace admin_email with admin_uri for greater flexibilityNeil Johnson2018-08-152-7/+7
| | | | |
| * | | | Merge branch 'develop' of github.com:matrix-org/synapse into neilj/admin_emailNeil Johnson2018-08-141-1/+11
| |\ \ \ \
| | * | | | make comments clearerNeil Johnson2018-08-141-1/+2
| | | |/ / | | |/| |
| | * | | rename _user_last_seen_monthly_activeNeil Johnson2018-08-091-1/+1
| | | | |
| | * | | fix errant parenthesisNeil Johnson2018-08-091-1/+1
| | | | |
| | * | | only block on sync where user is not part of the mau cohortNeil Johnson2018-08-091-2/+11
| | | |/ | | |/|
| * | | support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-132-4/+17
| | | | | | | | | | | | | | | | AuthError in all cases
| * | | Revert "support admin_email config and pass through into blocking errors, ↵Neil Johnson2018-08-132-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | return AuthError in all cases" This reverts commit 0d43f991a19840a224d3dac78d79f13d78212ee6.
| * | | support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-132-4/+17
| |/ / | | | | | | | | | AuthError in all cases
| * | fix pep8 too many linesNeil Johnson2018-08-081-1/+0
| | |
| * | Merge branch 'develop' into neilj/disable_hsNeil Johnson2018-08-082-0/+34
| |\ \
| | * \ Merge pull request #3654 from matrix-org/rav/room_versionsRichard van der Hoff2018-08-082-0/+33
| | |\ \ | | | | | | | | | | Support for room versioning
| | | * | Don't expose default_room_version as config optRichard van der Hoff2018-08-071-0/+3
| | | | |
| | | * | Enforce compatibility when processing make_join requestsRichard van der Hoff2018-08-031-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reject make_join requests from servers which do not support the room version. Also include the room version in the response.
| | | * | Basic support for room versioningRichard van der Hoff2018-08-032-0/+8
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first tranche of support for room versioning. It includes: * setting the default room version in the config file * new room_version param on the createRoom API * storing the version of newly-created rooms in the m.room.create event * fishing the version of existing rooms out of the m.room.create event
| * | | Merge branch 'neilj/mau_tracker' of github.com:matrix-org/synapse into ↵Neil Johnson2018-08-061-4/+1
| |\| | | | | | | | | | | | | | neilj/disable_hs
| | * | update comments to reflect new sigNeil Johnson2018-08-061-4/+1
| | | |
| * | | disable HS from configNeil Johnson2018-08-042-0/+5
| |/ /
| * | wip commit - tests failingNeil Johnson2018-08-031-2/+4
| | |
| * | Merge branch 'develop' of github.com:matrix-org/synapse into neilj/mau_trackerNeil Johnson2018-08-031-53/+53
| |\|
| | * Merge pull request #3639 from matrix-org/rav/refactor_error_handlingRichard van der Hoff2018-08-021-53/+53
| | |\ | | | | | | | | Clean up handling of errors from outbound requests
| | | * Kill off MatrixCodeMessageExceptionRichard van der Hoff2018-08-011-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code brings the SimpleHttpClient into line with the MatrixFederationHttpClient by having it raise HttpResponseExceptions when a request fails (rather than trying to parse for matrix errors and maybe raising MatrixCodeMessageException). Then, whenever we were checking for MatrixCodeMessageException and turning them into SynapseErrors, we now need to check for HttpResponseExceptions and call to_synapse_error.
| | | * Refactor code for turning HttpResponseException into SynapseErrorRichard van der Hoff2018-08-011-31/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces SynapseError.from_http_response_exception with HttpResponseException.to_synapse_error. The new method actually returns a ProxiedRequestError, which allows us to pass through additional metadata from the API call.
| | | * Be more careful which errors we send back over the C-S APIRichard van der Hoff2018-08-011-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We really shouldn't be sending all CodeMessageExceptions back over the C-S API; it will include things like 401s which we shouldn't proxy. That means that we need to explicitly turn a few HttpResponseExceptions into SynapseErrors in the federation layer. The effect of the latter is that the matrix errcode will get passed through correctly to calling clients, which might help with some of the random M_UNKNOWN errors when trying to join rooms.