summary refs log tree commit diff
path: root/synapse/rest/client/v1 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'd2f0ec12d' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-234-6/+18
|\
| * Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-164-6/+18
| | | | | | | | | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* | Merge commit '3f58fc848' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-1/+1
|\|
| * Merge pull request #9150 from Yoric/develop-contextDavid Teller2021-02-081-1/+1
| |\ | | | | | | New API /_synapse/admin/rooms/{roomId}/context/{eventId}
| | * FIXUP: Making get_event_context a bit more paranoidDavid Teller2021-01-281-1/+1
| | |
* | | Merge commit 'e19396d62' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-0/+2
|\| |
| * | Add 'brand' field to MSC2858 response (#9242)Richard van der Hoff2021-01-271-0/+2
| |/ | | | | | | | | | | We've decided to add a 'brand' field to help clients decide how to style the buttons. Also, fix up the allowed characters for idp_id, while I'm in the area.
* | Merge commit '2e537a028' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-6/+49
|\|
| * Implement MSC2858 support (#9183)Richard van der Hoff2021-01-271-6/+49
| | | | | | Fixes #8928.
* | Merge commit '0cd2938bc' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-2/+1
|\|
| * Support icons for Identity Providers (#9154)Richard van der Hoff2021-01-201-2/+1
| |
* | Merge commit '72822e60b' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-2/+17
|\|
| * Validate the server name for the /publicRooms endpoint. (#9161)Patrick Cloke2021-01-191-2/+17
| | | | | | | | If a remote server name is provided, ensure it is something reasonable before making remote connections to it.
* | Merge commit 'a03d71dc9' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-211-2/+2
|\|
| * Add some tests for the IDP picker flowRichard van der Hoff2021-01-071-2/+2
| |
* | Merge commit '0312266ee' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-211-69/+20
|\|
| * Combine the SSO Redirect Servlets (#9015)Richard van der Hoff2021-01-041-69/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement CasHandler.handle_redirect_request ... to make it match OidcHandler and SamlHandler * Clean up interface for OidcHandler.handle_redirect_request Make it accept `client_redirect_url=None`. * Clean up interface for `SamlHandler.handle_redirect_request` ... bring it into line with CAS and OIDC by making it take a Request parameter, move the magic for `client_redirect_url` for UIA into the handler, and fix the return type to be a `str` rather than a `bytes`. * Define a common protocol for SSO auth provider impls * Give SsoIdentityProvider an ID and register them * Combine the SSO Redirect servlets Now that the SsoHandler knows about the identity providers, we can combine the various *RedirectServlets into a single implementation which delegates to the right IdP. * changelog
* | Merge commit '9999eb2d0' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-211-7/+10
|\|
| * Allow redacting events on workers (#8994)Patrick Cloke2020-12-291-7/+10
| | | | | | Adds the redacts endpoint to workers that have the client listener.
* | Merge commit 'bd30cfe86' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-161-14/+1
|\|
| * Convert internal pusher dicts to attrs classes. (#8940)Patrick Cloke2020-12-161-14/+1
| | | | | | This improves type hinting and should use less memory.
* | Merge commit 'f14428b25' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-161-6/+19
|\|
| * Honour AS ratelimit settings for /login requests (#8920)Erik Johnston2020-12-111-6/+19
| | | | | | | | Fixes #8846.
* | Add knocking support (#81)Andrew Morgan2021-02-091-6/+4
| | | | | | | | | | | | | | | | | | Implement knocking as defined by https://github.com/matrix-org/matrix-doc/pull/2403 This is the base knocking stuff, taken from https://github.com/matrix-org/synapse/pull/6739 and does not include any public room directory changes. While knocking hasn't merged yet on mainline due to waiting on getting Complement into Synapse's CI, the code has been well-tested.
* | Merge commit 'd3ed93504' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-105/+2
|\|
| * Support "identifier" dicts in UIA (#8848)Richard van der Hoff2020-12-011-105/+2
| | | | | | | | | | | | | | | | | | | | The spec requires synapse to support `identifier` dicts for `m.login.password` user-interactive auth, which it did not (instead, it required an undocumented `user` parameter.) To fix this properly, we need to pull the code that interprets `identifier` into `AuthHandler.validate_login` so that it can be called from the UIA code. Fixes #5665.
* | Merge commit '09ac0569f' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-6/+21
|\|
| * Simplify appservice login code (#8847)Richard van der Hoff2020-11-301-6/+21
| | | | | | we don't need to support legacy login dictionaries here.
| * Use TYPE_CHECKING instead of magic MYPY variable. (#8770)Patrick Cloke2020-11-171-3/+2
| |
* | Merged commit 'deff8f628' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-3/+2
| |
* | Merge commit '054a6b953' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-318-47/+0
|\|
| * Remove unused OPTIONS handlers. (#8621)Patrick Cloke2020-10-229-53/+0
| | | | | | | | The handling of OPTIONS requests was consolidated in #7534, but the endpoint specific handlers were not removed.
* | Merge commit 'de5cafe98' into dinsicAndrew Morgan2020-12-311-0/+2
|\|
| * Expose the experimental appservice login flow to clients. (#8504)Patrick Cloke2020-10-191-0/+2
| |
* | Merge commit '74976a8e4' into dinsicAndrew Morgan2020-12-314-22/+18
|\|
| * Add correct M_BAD_JSON error code to /profile/{userId}/displayname (#8517)Aaron Raimist2020-10-141-1/+3
| | | | | | Fixes #8029
| * Remove the deprecated Handlers object (#8494)Patrick Cloke2020-10-093-21/+15
| | | | | | All handlers now available via get_*_handler() methods on the HomeServer.
* | Merge commit '6a8fd03ac' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-211-2/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6a8fd03ac': 1.21.0rc2 1.21.0rc2 Fix bug in remote thumbnail search (#8438) Fix DB query on startup for negative streams. (#8447) Convert additional templates to Jinja (#8444) Fix malformed log line in new federation "catch up" logic (#8442) Do not expose the experimental appservice login flow to clients. (#8440) update changelog fix a logging error in thumbnailer (#8435) changelog fixes fix version number
| * Do not expose the experimental appservice login flow to clients. (#8440)Patrick Cloke2020-10-011-2/+0
| |
* | Merge commit 'cc40a59b4' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-214-12/+27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cc40a59b4': 1.21.0 Add prometheus metrics to track federation delays (#8430) Make token serializing/deserializing async (#8427) Allow additional SSO properties to be passed to the client (#8413) changelog Add an improved "forward extremities" metric Rewrite BucketCollector Fix _exposition.py to stop stripping samples Drop support for ancient prometheus_client (#8426) Various clean ups to room stream tokens. (#8423) changelog Report state res metrics to Prometheus and log Move Measure calls into `resolve_events_with_store` Expose a `get_resource_usage` method in `Measure` Move `resolve_events_with_store` into StateResolutionHandler
| * Make token serializing/deserializing async (#8427)Erik Johnston2020-09-303-5/+12
| | | | | | The idea is that in future tokens will encode a mapping of instance to position. However, we don't want to include the full instance name in the string representation, so instead we'll have a mapping between instance name and an immutable integer ID in the DB that we can use instead. We'll then do the lookup when we serialize/deserialize the token (we could alternatively pass around an `Instance` type that includes both the name and ID, but that turns out to be a lot more invasive).
| * Allow additional SSO properties to be passed to the client (#8413)Patrick Cloke2020-09-301-7/+15
| |
* | Merge commit '4325be1a5' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-2111-48/+77
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4325be1a5': Fix missing null character check on guest_access room state Fixed a bug with reactivating users with the admin API (#8362) Admin API for reported events (#8217) Fix wording of deprecation notice in changelog Deprecation warning for synapse admin api being accessible under /_matrix Create function to check for long names in devices (#8364) Add a comment re #1691 Fix a bad merge from release-v1.20.0. (#8354) Admin API for querying rooms where a user is a member (#8306) Catch-up after Federation Outage (bonus): Catch-up on Synapse Startup (#8322) Simplify super() calls to Python 3 syntax. (#8344) Allow appservice users to /login (#8320) Update test logging to be able to accept braces (#8335) Move lint dependencies to extras_require (#8330)
| * Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-1811-38/+38
| | | | | | | | | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
| * Allow appservice users to /login (#8320)Will Hunt2020-09-181-10/+39
| | | | | | | | | | Add ability for ASes to /login using the `uk.half-shot.msc2778.login.application_service` login `type`. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* | Merge commit '453dfe210' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-2/+13
|\| | | | | | | | | | | * commit '453dfe210': blacklist MSC2753 sytests until it's implemented in synapse (#8285) Don't remember `enabled` of deleted push rules and properly return 404 for missing push rules in `.../actions` and `.../enabled` (#7796)
| * Don't remember `enabled` of deleted push rules and properly return 404 for ↵reivilibre2020-09-091-2/+13
| | | | | | | | | | | | | | missing push rules in `.../actions` and `.../enabled` (#7796) Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* | Merge commit '5c03134d0' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-54/+6
|\| | | | | | | | | | | | | * commit '5c03134d0': Convert additional database code to async/await. (#8195) Define StateMap as immutable and add a MutableStateMap type. (#8183) Move and refactor LoginRestServlet helper methods (#8182)
| * Move and refactor LoginRestServlet helper methods (#8182)Andrew Morgan2020-08-281-54/+6
| | | | | | | | | | | | | | This is split out from https://github.com/matrix-org/synapse/pull/7438, which had gotten rather large. `LoginRestServlet` has a couple helper methods, `login_submission_legacy_convert` and `login_id_thirdparty_from_phone`. They're primarily used for converting legacy user login submissions to "identifier" dicts ([see spec](https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-login)). Identifying information such as usernames or 3PID information used to be top-level in the login body. They're now supposed to be put inside an [identifier](https://matrix.org/docs/spec/client_server/r0.6.1#identifier-types) parameter instead. #7438's purpose is to allow using the new identifier parameter during User-Interactive Authentication, which is currently handled in AuthHandler. That's why I've moved these helper methods there. I also moved the refactoring of these method from #7438 as they're relevant.
* | Merge commit 'a466b6797' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-12/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a466b6797': Reduce run-times of tests by advancing the reactor less (#7757) Update debian systemd service to use Type=notify (#8169) Remove remaining is_guest argument uses from get_room_data calls (#8181) Do not propagate typing notifications from shadow-banned users. (#8176) Remove unused parameter from, and add safeguard in, get_room_data (#8174) Add required Debian dependencies to allow docker builds on the arm platform (#8144) Allow running mypy directly. (#8175) Update the test federation client to handle streaming responses (#8130) Do not propagate profile changes of shadow-banned users into rooms. (#8157) Make SlavedIdTracker.advance have same interface as MultiWriterIDGenerator (#8171) Convert simple_select_one and simple_select_one_onecol to async (#8162)
| * Do not propagate typing notifications from shadow-banned users. (#8176)Patrick Cloke2020-08-261-11/+15
| |
| * Remove unused parameter from, and add safeguard in, get_room_data (#8174)Andrew Morgan2020-08-261-1/+0
| | | | | | | | | | | | Small cleanup PR. * Removed the unused `is_guest` argument * Added a safeguard to a (currently) impossible code path, fixing static checking at the same time.
* | Merge commit '56efa9ec7' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-55/+82
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '56efa9ec7': (22 commits) Fix rate limiting unit tests. (#8167) Add functions to `MultiWriterIdGen` used by events stream (#8164) Do not allow send_nonmember_event to be called with shadow-banned users. (#8158) Changelog fixes Make StreamIdGen `get_next` and `get_next_mult` async (#8161) Wording fixes to 'name' user admin api filter (#8163) Fix missing double-backtick in RST document Search in columns 'name' and 'displayname' in the admin users endpoint (#7377) Add type hints for state. (#8140) Stop shadow-banned users from sending non-member events. (#8142) Allow capping a room's retention policy (#8104) Add healthcheck for default localhost 8008 port on /health endpoint. (#8147) Fix flaky shadow-ban tests. (#8152) Don't fail /submit_token requests on incorrect session ID if request_token_inhibit_3pid_errors is turned on (#7991) Do not apply ratelimiting on joins to appservices (#8139) Micro-optimisations to get_auth_chain_ids (#8132) Allow denying or shadow banning registrations via the spam checker (#8034) Stop shadow-banned users from sending invites. (#8095) Be more tolerant of membership events in unknown rooms (#8110) Improve the error code when trying to register using a name reserved for guests. (#8135) ...
| * Stop shadow-banned users from sending non-member events. (#8142)Patrick Cloke2020-08-241-30/+44
| |
| * Stop shadow-banned users from sending invites. (#8095)Patrick Cloke2020-08-201-27/+40
| |
* | Merge commit 'c9c544cda' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-192-5/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c9c544cda': Remove `ChainedIdGenerator`. (#8123) Switch the JSON byte producer from a pull to a push producer. (#8116) Updated docs: Added note about missing 308 redirect support. (#8120) Be stricter about JSON that is accepted by Synapse (#8106) Convert runWithConnection to async. (#8121) Remove the unused inlineCallbacks code-paths in the caching code (#8119) Separate `get_current_token` into two. (#8113) Convert events worker database to async/await. (#8071) Add a link to the matrix-synapse-rest-password-provider. (#8111)
| * Remove `ChainedIdGenerator`. (#8123)Erik Johnston2020-08-191-1/+1
| | | | | | | | | | It's just a thin wrapper around two ID gens to make `get_current_token` and `get_next` return tuples. This can easily be replaced by calling the appropriate methods on the underlying ID gens directly.
| * Be stricter about JSON that is accepted by Synapse (#8106)Patrick Cloke2020-08-191-4/+7
| |
* | Merge commit 'e04e465b4' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-4/+5
|\| | | | | | | | | | | | | | | | | | | * commit 'e04e465b4': Use the default templates when a custom template file cannot be found (#8037) Changelog changes Convert stream database to async/await. (#8074) Add a shadow-banned flag to users. (#8092) Convert pusher databases to async/await. (#8075) Convert receipts and events databases to async/await. (#8076)
| * Convert pusher databases to async/await. (#8075)Patrick Cloke2020-08-141-4/+5
| |
* | Merge commit 'db131b6b2' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-2/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'db131b6b2': Change the default log config to reduce disk I/O and storage (#8040) Implement login blocking based on SAML attributes (#8052) Add an assertion on prev_events in create_new_client_event (#8041) Typo Lint why mypy why Lint Incorporate review Incorporate review Fix PUT /pushrules to use the right rule IDs Back out the database hack and replace it with a temporary config setting Fix cache name Fix cache invalidation calls Lint Changelog Implement new experimental push rules with a database hack to enable them
| * Implement new experimental push rules (#7997)Brendan Abolivier2020-08-101-2/+9
| |\ | | | | | | With an undocumented configuration setting to enable them for specific users.
| | * Merge branch 'develop' of github.com:matrix-org/synapse into ↵Brendan Abolivier2020-08-061-1/+1
| | |\ | | | | | | | | | | | | babolivier/new_push_rules
| | * | Incorporate reviewBrendan Abolivier2020-08-061-2/+2
| | | |
| | * | Fix PUT /pushrules to use the right rule IDsBrendan Abolivier2020-08-031-2/+9
| | | |
* | | | Merge commit 'd4a7829b1' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-1/+1
|\| | | | | | | | | | | | | | | | | | | * commit 'd4a7829b1': Convert synapse.api to async/await (#8031)
| * | | Convert synapse.api to async/await (#8031)Patrick Cloke2020-08-061-1/+1
| | |/ | |/|
* | | Merge commit 'b6c6fb795' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-161-1/+1
|\| | | | | | | | | | | | | | * commit 'b6c6fb795': Allow guests to operate in encrypted rooms (#7314)
| * | Allow guests to operate in encrypted rooms (#7314)Michael Albert2020-08-031-1/+1
| |/ | | | | Signed-off-by: Michael Albert <michael.albert@awesome-technologies.de>
* | Revert "Remove "user_id" from GET /presence. (#7606)"Brendan Abolivier2020-08-181-3/+1
| | | | | | | | This reverts commit a3fbc23c39c0366392fd51faf0b1696f1f1d21c7.
* | Merge commit 'de119063f' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-0/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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) ...
| * Allow moving typing off master (#7869)Erik Johnston2020-07-161-0/+9
| |
* | Merge commit 'a973bcb8a' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-032-11/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
| * Ensure that calls to `json.dumps` are compatible with the standard library ↵Patrick Cloke2020-07-151-6/+7
| | | | | | | | json. (#7836)
| * Return the proper 403 Forbidden error during errors with JWT logins. (#7844)Patrick Cloke2020-07-151-5/+3
| |
* | Merge commit '77d2c0541' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-6/+19
|\| | | | | | | | | * commit '77d2c0541': Add the option to validate the `iss` and `aud` claims for JWT logins. (#7827)
| * Add the option to validate the `iss` and `aud` claims for JWT logins. (#7827)Patrick Cloke2020-07-141-6/+19
| |
* | Merge commit '43726783e' into dinsicAndrew Morgan2020-08-033-26/+30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-091-4/+2
| |
| * Stop passing bytes when dumping JSON (#7799)Patrick Cloke2020-07-081-1/+1
| |
| * Add documentation for JWT login type and improve sample config. (#7776)Patrick Cloke2020-07-061-21/+27
| |
* | Merge commit '5cdca53aa' into dinsicAndrew Morgan2020-08-031-4/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-4/+8
| | | | | | fixes #7016
| * Merge branch 'master' into developPatrick Cloke2020-07-021-7/+3
| |\
* | \ Merge commit 'e8c36e527' into dinsicAndrew Morgan2020-08-031-7/+3
|\ \ \ | | |/ | |/| | | | | | | | | | | | | * 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.
| * | Ensure that HTML pages served from Synapse include headers to avoid embedding.Patrick Cloke2020-07-021-7/+3
| | |
* | | Merge commit 'dc80a0762' into dinsicAndrew Morgan2020-08-032-3/+6
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+2
| | |
| * | add org.matrix.login.jwt so that m.login.jwt can be deprecated (#7675)Sorunome2020-06-241-1/+4
| | |
* | | Merge commit '46613aaf7' into dinsicAndrew Morgan2020-08-031-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+2
| |\ \ | | | | | | | | Implementation of https://github.com/matrix-org/matrix-doc/pull/2625
| | * \ Merge branch 'develop' into babolivier/mark_unreadBrendan Abolivier2020-06-151-1/+3
| | |\ \
| | * | | Use temporary prefixes as per the MSCBrendan Abolivier2020-06-101-1/+1
| | | | |
| | * | | Rename dont_push into mark_unreadBrendan Abolivier2020-06-101-2/+2
| | | |/ | | |/|
* | | | Merge commit 'a3f11567d' into dinsicAndrew Morgan2020-08-032-5/+2
|\| | | | | | | | | | | | | | | | | | | * 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-162-5/+2
| | | |
* | | | Merge commit '03619324f' into dinsicAndrew Morgan2020-08-032-3/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
| * | | Update m.id.phone to use 'phone' instead of 'number' (#7687)Andrew Morgan2020-06-151-2/+10
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | The spec [states](https://matrix.org/docs/spec/client_server/r0.6.1#phone-number) that `m.id.phone` requires the field `country` and `phone`. In Synapse, we've been enforcing `country` and `number`. I am not currently sure whether this affects any client implementations. This issue was introduced in #1994.
| * | Remove "user_id" from GET /presence. (#7606)Will Hunt2020-06-111-1/+3
| |/
* | Merge branch 'release-v1.15.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-241-59/+32
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) ...
| * Performance improvements and refactor of Ratelimiter (#7595)Andrew Morgan2020-06-051-44/+21
| | | | | | | | | | | | | | | | | | | | 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.
| * Advertise the token login type when OpenID Connect is enabled. (#7631)Patrick Cloke2020-06-041-8/+3
| |
| * Fix a bug in automatic user creation with m.login.jwt. (#7585)Olof Johansson2020-06-011-7/+8
| |
* | Merge branch 'release-v1.14.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-103-19/+52
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) ...
| * Add ability to wait for replication streams (#7542)Erik Johnston2020-05-221-8/+12
| | | | | | | | | | | | | | 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.
| * Support UI Authentication for OpenID Connect accounts (#7457)Patrick Cloke2020-05-151-12/+19
| |
| * Allow expired accounts to logout (#7443)Andrew Morgan2020-05-141-3/+3
| |
| * Implement OpenID Connect-based login (#7256)Quentin Gliech2020-05-081-3/+25
| |
* | Merge branch 'release-v1.13.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-102-167/+44
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * Improve error responses when a remote server doesn't allow you to access its ↵Andrew Morgan2020-04-061-13/+20
| | | | | | | | public rooms list (#6899)
| * Support CAS in UI Auth flows. (#7186)Patrick Cloke2020-04-031-4/+16
| |
| * Refactor the CAS code (move the logic out of the REST layer to a handler) ↵Patrick Cloke2020-03-261-155/+16
| | | | | | | | (#7136)
| * Fix CAS redirect url (#6634)Naugrimm2020-03-241-11/+16
| | | | | | Build the same service URL when requesting the CAS ticket and when calling the proxyValidate URL.
| * Clean-up some auth/login REST code (#7115)Patrick Cloke2020-03-201-8/+0
| |
* | Remove special casing of `m.room.aliases` events (#7034)Andrew Morgan2020-03-241-12/+0
|\| | | | | | | | | * commit '60724c46b': Remove special casing of `m.room.aliases` events (#7034)
| * Remove special casing of `m.room.aliases` events (#7034)Patrick Cloke2020-03-171-12/+0
| |
| * Merge branch 'master' into developBrendan Abolivier2020-03-031-30/+13
| |\
* | \ v1.11.1Andrew Morgan2020-03-241-30/+13
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | * 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
| * | Factor out complete_sso_login and expose it to the Module APIBrendan Abolivier2020-03-031-56/+2
| | |
| * | Add a whitelist for the SSO confirmation step.Richard van der Hoff2020-03-021-8/+18
| | |
| * | Add a confirmation step to the SSO login flowBrendan Abolivier2020-03-021-6/+34
| | |
* | | Ensure 'deactivated' parameter is a boolean on user admin API, Fix error ↵Andrew Morgan2020-03-241-0/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | handling of call to deactivate user (#6990) * commit '8c75b621b': Ensure 'deactivated' parameter is a boolean on user admin API, Fix error handling of call to deactivate user (#6990)
| * | Ensure 'deactivated' parameter is a boolean on user admin API, Fix error ↵Andrew Morgan2020-02-261-0/+1
| | | | | | | | | | | | handling of call to deactivate user (#6990)
* | | Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Andrew Morgan2020-03-242-5/+5
|\| | | | | | | | | | | | | | | | | | | | * 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-212-5/+5
| |/ | | | | | | Ensure good comprehension hygiene using flake8-comprehensions.
* | Move MSC2432 stuff onto unstable prefix (#6948)Andrew Morgan2020-03-241-1/+7
|\| | | | | | | | | * commit '880aaac1d': Move MSC2432 stuff onto unstable prefix (#6948)
| * Move MSC2432 stuff onto unstable prefix (#6948)Richard van der Hoff2020-02-191-1/+7
| | | | | | it's not in the spec yet, so needs to be unstable. Also add a feature flag for it. Also add a test for admin users.
* | Implement GET /_matrix/client/r0/rooms/{roomId}/aliases (#6939)Andrew Morgan2020-03-241-0/+23
|\| | | | | | | | | * 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-0/+23
| | | | | | | | | | per matrix-org/matrix-doc#2432
* | MSC2260: Block direct sends of m.room.aliases events (#6794)Andrew Morgan2020-03-231-0/+12
|\| | | | | | | | | * commit '184303b86': MSC2260: Block direct sends of m.room.aliases events (#6794)
| * MSC2260: Block direct sends of m.room.aliases events (#6794)Richard van der Hoff2020-01-301-0/+12
| | | | | | | | | | as per MSC2260
* | Fixup synapse.rest to pass mypy (#6732)Andrew Morgan2020-03-232-7/+13
|\| | | | | | | | | * commit 'b0a66ab83': Fixup synapse.rest to pass mypy (#6732)
| * Fixup synapse.rest to pass mypy (#6732)Erik Johnston2020-01-202-7/+13
| |
* | Fix `/events/:event_id` deprecated API. (#6731)Andrew Morgan2020-03-231-1/+1
|\| | | | | | | | | * commit '74b74462f': Fix `/events/:event_id` deprecated API. (#6731)
| * Fix `/events/:event_id` deprecated API. (#6731)Erik Johnston2020-01-201-1/+1
| |
* | Clean up startup for the pusher (#6558)Andrew Morgan2020-03-201-17/+16
|\| | | | | | | | | * commit 'd6752ce5d': Clean up startup for the pusher (#6558)
| * Clean up startup for the pusher (#6558)Richard van der Hoff2019-12-181-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove redundant python2 support code `str.decode()` doesn't exist on python3, so presumably this code was doing nothing * Filter out pushers with corrupt data When we get a row with unparsable json, drop the row, rather than returning a row with null `data`, which will then cause an explosion later on. * Improve logging when we can't start a pusher Log the ID to help us understand the problem * Make email pusher setup more robust We know we'll have a `data` member, since that comes from the database. What we *don't* know is if that is a dict, and if that has a `brand` member, and if that member is a string.
* | 1.7.0rc2Andrew Morgan2020-03-191-6/+6
|\| | | | | | | | | | | | | * commit 'd156912c4': 1.7.0rc2 Back out change preventing setting null avatar URLs Fixup changelogs
| * Back out change preventing setting null avatar URLsErik Johnston2019-12-111-6/+6
| |
* | Better errors regarding changing avatar_url (#6497)Andrew Morgan2020-03-191-3/+8
|\| | | | | | | | | * commit '5e8abe901': Better errors regarding changing avatar_url (#6497)
| * Better errors regarding changing avatar_url (#6497)Andrew Morgan2019-12-091-3/+8
| |
* | Merge pull request #6482 from matrix-org/erikj/port_rest_v1Andrew Morgan2020-03-1910-172/+118
|\| | | | | | | | | | | | | * commit 'af5d0ebc7': Newsfile Fixup tests Port rest/v1 to async/await
| * Port rest/v1 to async/awaitErik Johnston2019-12-0510-166/+117
| |
* | Fix: Pillow error when uploading RGBA image (#3325) (#6241)Andrew Morgan2020-03-191-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '81731c6e7': Fix: Pillow error when uploading RGBA image (#3325) (#6241) Add User-Interactive Auth to /account/3pid/add (#6119) Lint Changelog Discard retention policies when retrieving state blacklist more tests Newsfile Add tests Propagate reason in remotely rejected invites MSC2367 Allow reason field on all member events
| * MSC2367 Allow reason field on all member eventsErik Johnston2019-11-281-1/+1
| |
* | Merge pull request #6335 from matrix-org/erikj/rc_login_cleanupsAndrew Morgan2020-03-181-17/+94
|\| | | | | | | | | | | | | | | | | * commit '83446a18f': Lint Apply suggestions from code review Newsfile Add failed auth ratelimiting to UIA Only do `rc_login` ratelimiting on succesful login.
| * LintBrendan Abolivier2019-11-201-1/+3
| |
| * Apply suggestions from code reviewErik Johnston2019-11-181-1/+1
| | | | | | | | Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-Authored-By: Brendan Abolivier <babolivier@matrix.org>
| * Only do `rc_login` ratelimiting on succesful login.Erik Johnston2019-11-061-18/+93
| | | | | | | | | | | | | | | | | | | | | | | | We were doing this in a number of places which meant that some login code paths incremented the counter multiple times. It was also applying ratelimiting to UIA endpoints, which was probably not intentional. In particular, some custom auth modules were calling `check_user_exists`, which incremented the counters, meaning that people would fail to login sometimes.
| * Support for routing outbound HTTP requests via a proxy (#6239)Richard van der Hoff2019-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `http_proxy` and `HTTPS_PROXY` env vars can be set to a `host[:port]` value which should point to a proxy. The address of the proxy should be excluded from IP blacklists such as the `url_preview_ip_range_blacklist`. The proxy will then be used for * push * url previews * phone-home stats * recaptcha validation * CAS auth validation It will *not* be used for: * Application Services * Identity servers * Outbound federation * In worker configurations, connections from workers to masters Fixes #4198.
* | Update black to 19.10b0 (#6304)Andrew Morgan2020-03-161-6/+7
|\| | | | | | | | | * commit '020add509': Update black to 19.10b0 (#6304)
| * Update black to 19.10b0 (#6304)Amber Brown2019-11-011-6/+7
| | | | | | * update version of black and also fix the mypy config being overridden
* | 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.
* | Merge pull request #6275 from matrix-org/erikj/port_rest_eventsAndrew Morgan2020-03-161-94/+72
|\| | | | | | | | | | | * commit '72bc6294e': Newsfile Port room rest handlers to async/await
| * Port room rest handlers to async/awaitErik Johnston2019-10-291-94/+72
| |
* | cas: support setting display name (#6114)Andrew Morgan2020-02-261-1/+3
|\|
| * cas: support setting display name (#6114)Valérian Rousset2019-10-111-1/+3
| | | | | | Now, the CAS server can return an attribute stating what's the desired displayname, instead of using the username directly.
* | Land improved room list based on room stats (#6019)Andrew Morgan2020-02-261-0/+8
|\|
| * Land improved room list based on room stats (#6019)Erik Johnston2019-10-021-0/+8
| | | | | | | | Use room_stats and room_state for room directory search
* | Merge pull request #6108 from matrix-org/erikj/remove_get_user_by_req-spanAndrew Morgan2020-02-251-0/+18
|\|
| * isortErik Johnston2019-09-251-1/+1
| |
| * Add tags for event_id and txn_id in event sendingErik Johnston2019-09-251-0/+18
| | | | | | | | This will make it easier to search for sending event requests.
* | Merge pull request #6037 from matrix-org/rav/saml_mapping_workAndrew Morgan2020-02-251-0/+14
|\|
| * Merge branch 'develop' into rav/saml_mapping_workRichard van der Hoff2019-09-1911-67/+67
| |\
| * | Record mappings from saml users in an external tableRichard van der Hoff2019-09-131-0/+14
| | | | | | | | | | | | | | | | | | We want to assign unique mxids to saml users based on an incrementing suffix. For that to work, we need to record the allocated mxid in a separate table.
* | | Use the v2 Identity Service API for lookups (MSC2134 + MSC2140) (#5976)Andrew Morgan2020-02-251-0/+1
|\ \ \ | | |/ | |/|
| * | Use the v2 Identity Service API for lookups (MSC2134 + MSC2140) (#5976)Andrew Morgan2019-09-111-0/+1
| | | | | | | | | | | | | | | | | | | | | This is a redo of https://github.com/matrix-org/synapse/pull/5897 but with `id_access_token` accepted. Implements [MSC2134](https://github.com/matrix-org/matrix-doc/pull/2134) plus Identity Service v2 authentication ala [MSC2140](https://github.com/matrix-org/matrix-doc/pull/2140). Identity lookup-related functions were also moved from `RoomMemberHandler` to `IdentityHandler`.
* | | 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-2411-66/+66
|\| |
| * | Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-3011-66/+66
| |/ | | | | | | | | 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 :)
* | Return 404 instead of 403 when retrieving an event without perms (#5798)Andrew Morgan2020-02-201-3/+11
|\|
| * Return 404 instead of 403 when retrieving an event without perms (#5798)Andrew Morgan2019-08-061-3/+11
| | | | | | | | | | Part of fixing matrix-org/sytest#652 Sytest PR: matrix-org/sytest#667
| * Merge tag 'v1.2.0rc2' into developAndrew Morgan2019-07-241-7/+30
| |\ | | | | | | | | | | | | | | | | | | Bugfixes -------- - Fix a regression introduced in v1.2.0rc1 which led to incorrect labels on some prometheus metrics. ([\#5734](https://github.com/matrix-org/synapse/issues/5734))
* | \ Fix servlet metric names (#5734)Andrew Morgan2020-02-191-7/+30
|\ \ \ | | |/ | |/|
| * | Fix servlet metric names (#5734)Jorik Schellekens2019-07-241-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix servlet metric names Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * Remove redundant check * Cover all return paths
* | | Replace returnValue with return (#5736)Andrew Morgan2020-02-1911-76/+72
|\ \ \ | | |/ | |/|
| * | Replace returnValue with return (#5736)Amber Brown2019-07-2311-76/+72
| |/
* | Clean up exception handling for access_tokens (#5656)Andrew Morgan2020-02-172-4/+15
|\|
| * Clean up exception handling for access_tokens (#5656)Richard van der Hoff2019-07-112-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove access-token support from RegistrationHandler.register (#5641)Andrew Morgan2020-02-171-10/+4
|\|
| * Remove access-token support from RegistrationHandler.register (#5641)Richard van der Hoff2019-07-081-10/+4
| | | | | | | | | | | | | | | | Nothing uses this now, so we can remove the dead code, and clean up the API. Since we're changing the shape of the return value anyway, we take the opportunity to give the method a better name.
* | Factor out some redundant code in the login impl (#5639)Andrew Morgan2020-02-171-39/+10
|\|
| * Factor out some redundant code in the login impl (#5639)Richard van der Hoff2019-07-081-39/+10
| | | | | | | | | | | | | | | | * Factor out some redundant code in the login impl Also fixes a redundant access_token which was generated during jwt login. * changelog
* | Complete the SAML2 implementation (#5422)Andrew Morgan2020-02-141-8/+46
|\|
| * Complete the SAML2 implementation (#5422)Richard van der Hoff2019-07-021-8/+46
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * SAML2 Improvements and redirect stuff Signed-off-by: Alexander Trost <galexrt@googlemail.com> * Code cleanups and simplifications. Also: share the saml client between redirect and response handlers. * changelog * Revert redundant changes to static js * Move all the saml stuff out to a centralised handler * Add support for tracking SAML2 sessions. This allows us to correctly handle `allow_unsolicited: False`. * update sample config * cleanups * update sample config * rename BaseSSORedirectServlet for consistency * Address review comments
| | * Merge branch 'develop' into rav/saml2_clientRichard van der Hoff2019-07-011-1/+1
| | |\
| | * | rename BaseSSORedirectServlet for consistencyRichard van der Hoff2019-06-271-3/+3
| | | |
| | * | Move all the saml stuff out to a centralised handlerRichard van der Hoff2019-06-261-11/+2
| | | |
| | * | Merge branch 'develop' into rav/saml2_clientRichard van der Hoff2019-06-2610-327/+252
| | |\ \
| | * | | Code cleanups and simplifications.Richard van der Hoff2019-06-111-42/+41
| | | | | | | | | | | | | | | | | | | | Also: share the saml client between redirect and response handlers.
| | * | | Merge remote-tracking branch 'origin/develop' into rav/saml2_clientRichard van der Hoff2019-06-1012-203/+185
| | |\ \ \
| | * | | | SAML2 Improvements and redirect stuffAlexander Trost2019-06-021-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Trost <galexrt@googlemail.com>
* | | | | | Fix JWT login with new users (#5586)Andrew Morgan2020-02-141-6/+3
|\| | | | |
| * | | | | Fix JWT login with new users (#5586)PauRE2019-07-021-6/+3
| | |_|_|/ | |/| | | | | | | | | | | | | Signed-off-by: Pau Rodriguez-Estivill <prodrigestivill@gmail.com>
* | | | | Fix JWT login (#5555)Andrew Morgan2020-02-141-1/+1
|\| | | |
| * | | | Fix JWT login (#5555)PauRE2019-06-271-1/+1
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix JWT login with register Signed-off-by: Pau Rodriguez-Estivill <prodrigestivill@gmail.com> * Add pyjwt conditional dependency Signed-off-by: Pau Rodriguez-Estivill <prodrigestivill@gmail.com> * Added changelog file Signed-off-by: Pau Rodriguez-Estivill <prodrigestivill@gmail.com> * Improved changelog description Signed-off-by: Pau Rodriguez-Estivill <prodrigestivill@gmail.com>
| * | | Split public rooms directory auth config in twoBrendan Abolivier2019-06-241-1/+1
| | | |
| * | | Run Black. (#5482)Amber Brown2019-06-2010-322/+246
| | |/ | |/|
* | | Dinsic Blacking with black==18.6b2Andrew Morgan2020-02-1110-333/+252
| | |
* | | Add the ability to restrict max avatar filesize and content-type (#19)Andrew Morgan2019-12-121-2/+3
| | |
* | | Support for routing outbound HTTP requests via a proxy (#6239)Richard van der Hoff2019-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `http_proxy` and `HTTPS_PROXY` env vars can be set to a `host[:port]` value which should point to a proxy. The address of the proxy should be excluded from IP blacklists such as the `url_preview_ip_range_blacklist`. The proxy will then be used for * push * url previews * phone-home stats * recaptcha validation * CAS auth validation It will *not* be used for: * Application Services * Identity servers * Outbound federation * In worker configurations, connections from workers to masters Fixes #4198.
* | | Split public rooms directory auth config in twoBrendan Abolivier2019-06-241-1/+1
| | |
* | | LintBrendan Abolivier2019-06-121-1/+0
| | |
* | | Merge branch 'master' into dinsicBrendan Abolivier2019-06-1212-220/+195
|\| |
| * | Hawkowl/fix missing auth (#5328)Amber Brown2019-06-041-0/+1
| | |
| * | Unify v1 and v2 REST client APIs (#5226)Amber Brown2019-06-0312-203/+183
| |/
| * Fix ignored filter field in `/messages` endpointEisha Chen-yen-su2019-05-301-0/+2
| | | | | | | | | | | | | | | | This fixes a bug which were causing the "event_format" field to be ignored in the filter of requests to the `/messages` endpoint of the CS API. Signed-off-by: Eisha Chen-yen-su <chenyensu0@gmail.com>
| * Merge pull request #5256 from aaronraimist/logout-correct-errorErik Johnston2019-05-301-18/+9
| |\ | | | | | | Show correct error when logging out and access token is missing
| | * LintAaron Raimist2019-05-291-2/+0
| | | | | | | | | | | | Signed-off-by: Aaron Raimist <aaron@raim.ist>
| | * Get rid of try exceptAaron Raimist2019-05-271-16/+9
| | | | | | | | | | | | Signed-off-by: Aaron Raimist <aaron@raim.ist>
| | * Show correct error when logging out and access token is missingAaron Raimist2019-05-241-4/+4
| | | | | | | | | | | | Signed-off-by: Aaron Raimist <aaron@raim.ist>
| * | Serve CAS login over r0 (#5286)Amber Brown2019-05-301-2/+2
| |/
* | Merge branch 'babolivier/per_room_profiles' into dinsic dinsic_2019-05-17Brendan Abolivier2019-05-173-18/+24
|\|
| * Drop support for v2_alpha API prefix (#5190)Richard van der Hoff2019-05-151-4/+4
| |
| * Allow client event serialization to be asyncErik Johnston2019-05-142-14/+20
| |
* | Merge branch 'release-v0.99.4' into dinsic dinsic_2019-05-14Brendan Abolivier2019-05-144-847/+49
|\|
| * add options to require an access_token to GET /profile and /publicRooms on ↵Matthew Hodgson2019-05-082-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CS API (#5083) This commit adds two config options: * `restrict_public_rooms_to_local_users` Requires auth to fetch the public rooms directory through the CS API and disables fetching it through the federation API. * `require_auth_for_profile_requests` When set to `true`, requires that requests to `/profile` over the CS API are authenticated, and only returns the user's profile if the requester shares a room with the profile's owner, as per MSC1301. MSC1301 also specifies a behaviour for federation (only returning the profile if the server asking for it shares a room with the profile's owner), but that's currently really non-trivial to do in a not too expensive way. Next step is writing down a MSC that allows a HS to specify which user sent the profile query. In this implementation, Synapse won't send a profile query over federation if it doesn't believe it already shares a room with the profile's owner, though. Groups have been intentionally omitted from this commit.
| * Move admin api impl to its own packageRichard van der Hoff2019-05-011-896/+0
| | | | | | | | It doesn't really belong under rest/client/v1 any more.
| * Move admin API to a new prefixRichard van der Hoff2019-05-011-20/+50
| |
| * Move admin API away from ClientV1RestServletRichard van der Hoff2019-05-011-33/+33
| |
| * Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-04-173-78/+42
| |\ | | | | | | | | | babolivier/account_expiration
| | * Remove usage of request.postpathErik Johnston2019-04-161-8/+8
| | | | | | | | | | | | | | | | | | | | | This is an undocumented variable in twisted, and relies on the servlet being mounted in the right way. This also breaks getting push rules on workers.
| | * Only handle GET requests for /push_rulesErik Johnston2019-04-151-0/+7
| | |
| * | Add management endpoints for account validityBrendan Abolivier2019-04-171-0/+39
| | |
* | | Merge branch 'develop' into dinsicAndrew Morgan2019-04-152-70/+27
|\ \ \ | | |/ | |/|
| * | Add admin API for group deletionErik Johnston2019-04-031-0/+26
| | |
| * | Fix grammar and document get_current_users_in_room (#4998)Andrew Morgan2019-04-031-1/+1
| | |
| * | Remove presence lists (#4989)Neil Johnson2019-04-031-67/+0
| | | | | | | | | Remove presence list support as per MSC 1819
| * | remove log line for password (#4965)Neil Johnson2019-03-281-2/+0
| |/ | | | | | | Remove log line for password.
* | Merge branch 'master' of github.com:matrix-org/synapse into dinsicErik Johnston2019-04-051-4/+45
|\|
| * Support 3PID login in password providers (#4931)Andrew Morgan2019-03-261-4/+45
| | | | | | | | | | 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.
* | Add 3PID invite support to spam checkerErik Johnston2019-03-211-1/+2
| |
* | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/dinsic-mergedErik Johnston2019-03-212-31/+79
|\|
| * Use flagsErik Johnston2019-03-201-2/+4
| |
| * Gracefully handle failing to kick userErik Johnston2019-03-201-19/+27
| |
| * Log new room IDErik Johnston2019-03-201-1/+6
| |
| * Add ratelimiting on login (#4821)Brendan Abolivier2019-03-151-0/+10
| | | | | | Add two ratelimiters on login (per-IP address and per-userID).
| * Send message after room has been shutdownErik Johnston2019-03-061-11/+11
| | | | | | | | | | | | | | | | Currently the explanation message is sent to the abuse room before any users are forced joined, which means it tends to get lost in the backlog of joins. So instead we send the message *after* we've forced joined everyone.
| * Add 'server_version' endpoint to admin APIJoseph Weston2019-03-011-0/+23
| | | | | | | | | | This is required because the 'Server' HTTP header is not always passed through proxies.
* | Merge branch 'master' of github.com:matrix-org/synapse into ↵Erik Johnston2019-03-155-161/+162
|\| | | | | | | erikj/dinsic-merged-master
| * Fix registration on workers (#4682)Erik Johnston2019-02-201-2/+2
| | | | | | | | | | | | | | | | | | | | * Move RegistrationHandler init to HomeServer * Move post registration actions to RegistrationHandler * Add post regisration replication endpoint * Newsfile
| * Move register_device into handlerErik Johnston2019-02-181-37/+22
| |
| * Fix typosAndrew Morgan2019-01-221-4/+4
| |
| * Return well_known in /login response (#4319)Richard van der Hoff2018-12-241-7/+11
| | | | | | | | ... as per MSC1730.
| * create support user (#4141)Neil Johnson2018-12-141-1/+10
| | | | | | | | | | | | 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.
| * Initialise user displayname from SAML2 data (#4272)Richard van der Hoff2018-12-071-0/+5
| | | | | | | | | | When we register a new user from SAML2 data, initialise their displayname correctly.
| * Factor SSO success handling out of CAS login (#4264)Richard van der Hoff2018-12-071-29/+76
| | | | | | | | This is mostly factoring out the post-CAS-login code to somewhere we can reuse it for other SSO flows, but it also fixes the userid mapping while we're at it.
| * Rip out half-implemented m.login.saml2 support (#4265)Richard van der Hoff2018-12-061-67/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * Rip out half-implemented m.login.saml2 support This was implemented in an odd way that left most of the work to the client, in a way that I really didn't understand. It's going to be a pain to maintain, so let's start by ripping it out. * drop undocumented dependency on dateutil It turns out we were relying on dateutil being pulled in transitively by pysaml2. There's no need for that bloat.