summary refs log tree commit diff
path: root/synapse/rest/client/v1 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| * Fix non-ASCII pushrules (#4248)Amber Brown2018-12-041-12/+23
| |
| * fix type errorAmber Brown2018-12-031-1/+1
| |
| * Support m.login.sso (#4220)Richard van der Hoff2018-11-271-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Clean up the CSS for the fallback login form I was finding this hard to work with, so simplify a bunch of things. Each flow is now a form inside a div of class login_flow. The login_flow class now has a fixed width, as that looks much better than each flow having a differnt width. * Support m.login.sso MSC1721 renames m.login.cas to m.login.sso. This implements the change (retaining support for m.login.cas for older clients). * changelog
* | Synchronise account metadata onto another server. (#4145) dinsic_2019-01-11Matthew Hodgson2019-01-111-0/+44
|/ | | | | * implement shadow registration via AS (untested) * shadow support for 3pid binding/unbinding (untested)
* Refactor state group lookup to reduce DB hits (#4011)Erik Johnston2018-10-251-1/+2
| | | | | | | | Currently when fetching state groups from the data store we make two hits two the database: once for members and once for non-members (unless request is filtered to one or the other). This adds needless load to the datbase, so this PR refactors the lookup to make only a single database hit.
* Clean up room alias creationErik Johnston2018-10-191-32/+5
|
* Merge pull request #3835 from krombel/fix_3821Amber Brown2018-09-121-1/+5
|\ | | | | fix VOIP crashes under Python 3
| * fix VOIP crashes under Python 3 (#3821)Krombel2018-09-101-1/+5
| |
* | Port rest/ to Python 3 (#3823)Amber Brown2018-09-127-52/+57
|/
* Allow guests to access /rooms/:roomId/event/:eventIdWill Hunt2018-08-201-1/+1
|
* Integrate presence from hotfixes (#3694)Amber Brown2018-08-181-1/+2
|
* speed up /members and add at= and membership params (#3568)Matthew Hodgson2018-08-151-3/+29
|
* Don't fail requests to unbind 3pids for non supporting ID serversErik Johnston2018-08-081-2/+9
| | | | | | | | | | Older identity servers may not support the unbind 3pid request, so we shouldn't fail the requests if we received one of 400/404/501. The request still fails if we receive e.g. 500 responses, allowing clients to retry requests on transient identity server errors that otherwise do support the API. Fixes #3661
* Merge branch 'master' into developRichard van der Hoff2018-08-022-2/+2
|\
| * Check room visibility for /event/ requestsRichard van der Hoff2018-08-022-2/+2
| | | | | | | | | | | | | | | | Make sure that the user has permission to view the requeseted event for /event/{eventId} and /room/{roomId}/event/{eventId} requests. Also check that the event is in the given room for /room/{roomId}/event/{eventId}, for sanity.
* | Merge pull request #3620 from fuzzmz/return-404-room-not-foundRichard van der Hoff2018-08-011-2/+2
|\ \ | | | | | | return 404 if room not found
| * | return NotFoundError if room not foundSerban Constantin2018-07-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per the Client-Server API[0] we should return `M_NOT_FOUND` if the room isn't found instead of generic SynapseError. This ensures that /directory/list API returns 404 for room not found instead of 400. [0]: https://matrix.org/docs/spec/client_server/unstable.html#get-matrix-client-r0-directory-list-room-roomid Signed-off-by: Serban Constantin <serban.constantin@gmail.com>
* | | Python 3: Convert some unicode/bytes uses (#3569)Amber Brown2018-08-021-7/+15
|/ /
* | make /context lazyload & filter aware (#3567)Matthew Hodgson2018-07-271-0/+9
| | | | | | make /context lazyload & filter aware.
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-07-233-437/+126
|\ \ | | | | | | | | | erikj/client_apis_move
| * | Admin API for creating new users (#3415)Amber Brown2018-07-201-0/+122
| | |
| * | Move v1-only APIs into their own module & isolate deprecated ones (#3460)Amber Brown2018-07-192-437/+4
| |/
* | Move RoomContextHandler out of HandlersErik Johnston2018-07-181-2/+2
| | | | | | | | This is in preparation for moving GET /context/ to a worker
* | Split MessageHandler into read only and writersErik Johnston2018-07-182-15/+13
|/ | | | | This will let us call the read only parts from workers, and so be able to move some APIs off of master, e.g. the `/state` API.
* check isort by travisKrombel2018-07-162-3/+3
|
* Fix develop because I broke it :( (#3535)Amber Brown2018-07-141-2/+2
|
* Merge pull request #3534 from krombel/use_parse_and_asserts_from_servletAmber Brown2018-07-147-74/+42
|\ | | | | Use parse and asserts from http.servlet
| * fix sytestsAmber Brown2018-07-141-1/+1
| |
| * add changelogKrombel2018-07-131-1/+1
| |
| * rename assert_params_in_request to assert_params_in_dictKrombel2018-07-135-14/+14
| | | | | | | | | | | | the method "assert_params_in_request" does handle dicts and not requests. A request body has to be parsed to json before this method can be used
| * Use parse_{int,str} and assert from http.servletKrombel2018-07-137-75/+43
| | | | | | | | | | | | | | parse_integer and parse_string can take a request and raise errors in case we have wrong or missing params. This PR tries to use them more to deduplicate some code and make it better readable
* | Make auth & transactions more testable (#3499)Amber Brown2018-07-143-6/+5
|/
* run isortAmber Brown2018-07-0914-86/+88
|
* Attempt to be more performant on PyPy (#3462)Amber Brown2018-06-282-2/+3
|
* update doc for deactivate APIMatthew Hodgson2018-06-261-1/+1
|
* add GDPR erase param to deactivate APIMatthew Hodgson2018-06-261-1/+12
|
* Revert "Revert "Merge pull request #3431 from ↵Erik Johnston2018-06-251-1/+3
| | | | | | matrix-org/rav/erasure_visibility"" This reverts commit 1d009013b3c3e814177afc59f066e02a202b21cd.
* Revert "Merge pull request #3431 from matrix-org/rav/erasure_visibility"Richard van der Hoff2018-06-221-3/+1
| | | | | This reverts commit ce0d911156b355c5bf452120bfb08653dad96497, reversing changes made to b4a5d767a94f1680d07edfd583aae54ce422573e.
* Merge pull request #3431 from matrix-org/rav/erasure_visibilityErik Johnston2018-06-221-1/+3
|\ | | | | Support hiding events from deleted users
| * mark accounts as erased when requestedRichard van der Hoff2018-06-121-1/+3
| |
* | Remove run_on_reactor (#3395)Amber Brown2018-06-141-7/+0
|/
* fix logRichard van der Hoff2018-06-071-1/+1
|
* Fix event-purge-by-ts admin APIRichard van der Hoff2018-06-071-6/+4
| | | | | | This got completely broken in 0.30. Fixes #3300.
* Replace some more comparisons with sixAdrian Tschira2018-05-191-3/+5
| | | | | | plus a bonus b"" string I missed last time Signed-off-by: Adrian Tschira <nota@notafile.com>
* Merge pull request #3221 from matrix-org/erikj/purge_tokenErik Johnston2018-05-181-7/+10
|\ | | | | Make purge_history operate on tokens
| * Make purge_history operate on tokensErik Johnston2018-05-151-7/+10
| | | | | | | | As we're soon going to change how topological_ordering works
* | Move RoomCreationHandler out of synapse.handlers.HandlersRichard van der Hoff2018-05-172-5/+4
|/ | | | | | | Handlers is deprecated nowadays, so let's move this out before I add a new dependency on it. Also fix the docstrings on create_room.
* Set Server header in SynapseRequestRichard van der Hoff2018-05-101-1/+0
| | | | | | | | | | | | (instead of everywhere that writes a response. Or rather, the subset of places which write responses where we haven't forgotten it). This also means that we don't have to have the mysterious version_string attribute in anything with a request handler. Unfortunately it does mean that we have to pass the version string wherever we instantiate a SynapseSite, which has been c&ped 150 times, but that is code that ought to be cleaned up anyway really.
* Burminate v1authAdrian Tschira2018-04-302-2/+6
| | | | | | | | | | | | | | | | | | This closes #2602 v1auth was created to account for the differences in status code between the v1 and v2_alpha revisions of the protocol (401 vs 403 for invalid tokens). However since those protocols were merged, this makes the r0 version/endpoint internally inconsistent, and violates the specification for the r0 endpoint. This might break clients that rely on this inconsistency with the specification. This is said to affect the legacy angular reference client. However, I feel that restoring parity with the spec is more important. Either way, it is critical to inform developers about this change, in case they rely on the illegal behaviour. Signed-off-by: Adrian Tschira <nota@notafile.com>
* add guard for None on purge_history apiKrombel2018-04-301-1/+14
|
* Merge pull request #3156 from NotAFile/py3-hmac-bytesRichard van der Hoff2018-04-301-7/+9
|\ | | | | Construct HMAC as bytes on py3
| * Construct HMAC as bytes on py3Adrian Tschira2018-04-291-7/+9
| | | | | | | | Signed-off-by: Adrian Tschira <nota@notafile.com>
* | Use six.moves.urlparseAdrian Tschira2018-04-152-5/+6
|/ | | | | | The imports were shuffled around a bunch in py3 Signed-off-by: Adrian Tschira <nota@notafile.com>
* Merge pull request #3079 from matrix-org/erikj/limit_concurrent_sendsErik Johnston2018-04-101-6/+1
|\ | | | | Limit concurrent event sends for a room
| * Use create_and_send_nonmember_event everywhereErik Johnston2018-04-091-6/+1
| |
* | Merge pull request #3061 from NotAFile/add-some-byte-stringsRichard van der Hoff2018-04-091-2/+2
|\ \ | | | | | | Add b prefixes to some strings that are bytes in py3
| * | Add b prefixes to some strings that are bytes in py3Adrian Tschira2018-04-041-2/+2
| | | | | | | | | | | | | | | | | | This has no effect on python2 Signed-off-by: Adrian Tschira <nota@notafile.com>
* | | Merge pull request #2938 from dklug/developRichard van der Hoff2018-04-091-1/+4
|\ \ \ | |_|/ |/| | Return 401 for invalid access_token on logout
| * | Return 401 for invalid access_token on logoutdklug2018-03-021-1/+4
| | | | | | | | | | | | Signed-off-by: Duncan Klug <dklug@ucmerced.edu>
* | | Merge pull request #2986 from jplatte/join_reponse_room_idRichard van der Hoff2018-04-051-1/+6
|\ \ \ | |_|/ |/| | Add room_id to the response of `rooms/{roomId}/join`
| * | Add room_id to the response of `rooms/{roomId}/join`Jonas Platte2018-03-131-1/+6
| | | | | | | | | | | | Fixes #2349
* | | Merge branch 'master' of github.com:matrix-org/synapse into developErik Johnston2018-03-191-1/+1
|\ \ \ | |/ / |/| |
| * | Replace ujson with simplejsonErik Johnston2018-03-151-1/+1
| | |
* | | RoomMembershipRestServlet doesn't handle /forgetErik Johnston2018-03-131-1/+1
| | | | | | | | | | | | | | | Due to the order we register the REST handlers `/forget` was handled by the correct handler.
* | | Add transactional API to history purgeRichard van der Hoff2018-03-121-3/+35
| | | | | | | | | | | | Make the purge request return quickly, and allow scripts to poll for updates.