summary refs log tree commit diff
path: root/synapse (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Refactor request sending to have better excpetions (#4358)Erik Johnston2019-01-084-41/+108
| | | | | | | | | | | | | | * Correctly retry and back off if we get a HTTPerror response * Refactor request sending to have better excpetions MatrixFederationHttpClient blindly reraised exceptions to the caller without differentiating "expected" failures (e.g. connection timeouts etc) versus more severe problems (e.g. programming errors). This commit adds a RequestSendFailed exception that is raised when "expected" failures happen, allowing the TransactionQueue to log them as warnings while allowing us to log other exceptions as actual exceptions.
* Fix synapse.config.__main__ on python 3 (#4356)Amber Brown2019-01-081-1/+1
|
* Add GET account data routes (#4303)Travis Ralston2019-01-071-1/+33
| | | | As per https://github.com/matrix-org/matrix-doc/issues/1339
* Check jinja version for consent resource (#4327)Richard van der Hoff2019-01-073-28/+74
| | | | | | | | * Raise a ConfigError if an invalid resource is specified * Require Jinja 2.9 for the consent resource * changelog
* fix the check for whether `is_url` to match all the other ones in codebase ↵Michael Telatynski2019-01-061-3/+8
| | | | | | (#3405) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* fix NPE in /messages by checking if all events were filtered out (#4330)Matthew Hodgson2019-01-021-10/+11
|
* Ensure synchrotrons can access is_support_user in the storage layerNeil Johnson2019-01-021-25/+25
|
* Remove v1 only REST APIs now we don't ship matrix console (#4334)Amber Brown2018-12-294-445/+0
|
* Log roomid along with Unknown room (#4297)Will Hunt2018-12-241-1/+1
|
* Merge pull request #4307 from matrix-org/erikj/v2_roomsRichard van der Hoff2018-12-242-1/+5
|\ | | | | Add v2 room version
| * Add v2 room versionErik Johnston2018-12-182-1/+5
| |
* | Return well_known in /login response (#4319)Richard van der Hoff2018-12-241-7/+11
| | | | | | | | ... as per MSC1730.
* | Add a script to generate a clean config file (#4315)Richard van der Hoff2018-12-229-46/+89
| |
* | Fix indentation in default config (#4313)Richard van der Hoff2018-12-221-35/+35
| | | | | | These settings are not supposed to be under 'listeners'.
* | Fix IP URL previews on Python 3 (#4215)Amber Brown2018-12-223-171/+255
| |
* | Make the dependencies more like a standard Python project and hook up the ↵Amber Brown2018-12-223-147/+90
| | | | | | | | optional dependencies to setuptools (#4298)
* | Merge branch 'master' into developRichard van der Hoff2018-12-201-1/+1
|\ \
| * | Prepare 0.34 releaseRichard van der Hoff2018-12-201-1/+1
| | |
| * | Debian packaging via dh_virtualenvRichard van der Hoff2018-12-201-1/+1
| |\ \
| | * | Debian packaging via dh_virtualenv (#4285)Richard van der Hoff2018-12-202-2/+2
| | | |
| * | | Add 'sandbox' to CSP for media repo (#4284)David Baker2018-12-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Add 'sandbox' to the CSP for media repo * Changelog
| * | | Improved welcome page (#4294)Nad Chishtie2018-12-141-25/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Improved static/index.html look, feel and content. * Added accessibility tags to in-line SVG. * Grammar.
| * | | Settings Fix deleting e2e room keys on xenial (#4295)Amber Brown2018-12-141-1/+1
| |/ /
* | | Fixed line lengthNathan Pennie2018-12-191-1/+5
| | |
* | | Fix the variable names used for account_dataNathan Pennie2018-12-191-3/+3
| | |
* | | ensure can report mau stats when hs.config.mau_stats_only is set (#4305)Neil Johnson2018-12-181-1/+1
| | | | | | | | | * ensure can report mau stats when hs.config.mau_stats_only is set
* | | create support user (#4141)Neil Johnson2018-12-1410-33/+159
| | | | | | | | | | | | | | | | | | 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.
* | | Settings Fix deleting e2e room keys on xenial (#4295)Amber Brown2018-12-141-1/+1
| | |
* | | Improved welcome page (#4294)Nad Chishtie2018-12-141-25/+62
| | | | | | | | | | | | | | | | | | | | | * Improved static/index.html look, feel and content. * Added accessibility tags to in-line SVG. * Grammar.
* | | Merge branch 'release-v0.34.0' into developRichard van der Hoff2018-12-115-51/+68
|\| |
| * | 0.34.0rc2 v0.34.0rc2Richard van der Hoff2018-12-111-1/+1
| | |
| * | Merge pull request #4290 from matrix-org/rav/remove_webclientRichard van der Hoff2018-12-113-50/+38
| |\ \ | | | | | | | | Stop installing Matrix Console by default
| | * | Stop installing Matrix Console by defaultRichard van der Hoff2018-12-113-50/+38
| | | | | | | | | | | | | | | | This is based on the work done by @krombel in #2601.
| * | | Merge pull request #4289 from matrix-org/rav/welcome_pageRichard van der Hoff2018-12-112-0/+29
| |\ \ \ | | | | | | | | | | Add a welcome page to the static resources
| | * | | Add a welcome page to the static resourcesRichard van der Hoff2018-12-112-0/+29
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is largely a precursor for the removal of the bundled webclient. The idea is to present a page at / which reassures people that something is working, and to give them some links for next steps. The welcome page lives at `/_matrix/static/`, so is enabled alongside the other `static` resources (which, in practice, means the client API is enabled). We'll redirect to it from `/` if we have nothing better to display there. It would be nice to have a way to disable it (in the same way that you might disable the nginx welcome page), but I can't really think of a good way to do that without a load of ickiness. It's based on the work done by @krombel for #2601.
| * / / Prepare 0.34.0rc1Richard van der Hoff2018-12-041-1/+1
| |/ /
* | | Add 'sandbox' to CSP for media repo (#4284)David Baker2018-12-111-1/+2
| | | | | | | | | | | | | | | | | | * Add 'sandbox' to the CSP for media repo * Changelog
* | | Move imports to one lineWill Hunt2018-12-101-4/+1
| | |
* | | Use `send_cors`Will Hunt2018-12-101-4/+1
| | |
* | | changelog & isortWill Hunt2018-12-091-1/+5
| | |
* | | Make /config more CORS-yWill Hunt2018-12-091-1/+3
| | |
* | | Initialise user displayname from SAML2 data (#4272)Richard van der Hoff2018-12-074-14/+37
| | | | | | | | | | | | | | | When we register a new user from SAML2 data, initialise their displayname correctly.
* | | Implement SAML2 authentication (#4267)Richard van der Hoff2018-12-077-2/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements both a SAML2 metadata endpoint (at `/_matrix/saml2/metadata.xml`), and a SAML2 response receiver (at `/_matrix/saml2/authn_response`). If the SAML2 response matches what's been configured, we complete the SSO login flow by redirecting to the client url (aka `RelayState` in SAML2 jargon) with a login token. What we don't yet have is anything to build a SAML2 request and redirect the user to the identity provider. That is left as an exercise for the reader.
* | | Factor SSO success handling out of CAS login (#4264)Richard van der Hoff2018-12-073-31/+153
| | | | | | | | | | | | 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-065-154/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | drop undocumented dependency on dateutil (#4266)Richard van der Hoff2018-12-061-7/+6
| | | | | | | | | | | | It turns out we were relying on dateutil being pulled in transitively by pysaml2. There's no need for that bloat.
* | | Implement .well-known handling (#4262)Richard van der Hoff2018-12-053-0/+81
|/ / | | | | | | Sometimes it's useful for synapse to generate its own .well-known file.
* | Add an option to enable recording IPs for appservice users (#3831)Travis Ralston2018-12-042-9/+25
| |
* | Fix non-ASCII pushrules (#4248)Amber Brown2018-12-041-12/+23
| |
* | Add an option to disable search for homeservers which may not be interested ↵Travis Ralston2018-12-043-1/+20
| | | | | | | | | | | | in it (#4230) This is useful for homeservers not intended for users, such as bot-only homeservers or ones that only process IoT data.
* | add more detail to logging regarding "More than one row matched" error (#4234)Ben Parsons2018-12-041-6/+6
| |
* | Fix UnicodeDecodeError when postgres is not configured in english (#4253)Richard van der Hoff2018-12-042-8/+46
| | | | | | | | This is a bit of a half-assed effort at fixing https://github.com/matrix-org/synapse/issues/4252. Fundamentally the right answer is to drop support for Python 2.
* | Merge pull request #4244 from aaronraimist/drop-sent-txtRichard van der Hoff2018-12-046-74/+3
|\ \ | | | | | | Drop sent_transactions
| * | Drop sent_transactionsAaron Raimist2018-12-016-74/+3
| | | | | | | | | | | | Signed-off-by: Aaron Raimist <aaron@raim.ist>
* | | Merge pull request #4250 from matrix-org/hawkowl/pusher-remove-py3Richard van der Hoff2018-12-041-1/+1
|\ \ \ | | | | | | | | Fix removing pushers on python 3
| * | | fix type errorAmber Brown2018-12-031-1/+1
| | | |
* | | | Run the AS senders as background processes (#4189)Richard van der Hoff2018-12-041-12/+24
|/ / / | | | | | | | | | This should fix some "Starting db connection from sentinel context" warnings, and will mean we get metrics for these processes.
* / / Workaround for non-ascii event ids (#4241)Richard van der Hoff2018-12-031-1/+3
|/ / | | | | | | | | | | It turns out that we accept events with non-ascii IDs, which would later cause an explosion during state res. Fixes #4226
* | Neilj/fix autojoin (#4223)Neil Johnson2018-11-283-2/+24
| | | | | | | | | | | | * Fix auto join failures for servers that require user consent * Fix auto join failures for servers that require user consent
* | Neilj/fix mau initial reserved users (#4211)Neil Johnson2018-11-281-2/+3
| | | | | | | | | | | | | | | | * fix transaction wrapping bug that caused get_user_id_by_threepid_txn to fail * towncrier * white space
* | Support m.login.sso (#4220)Richard van der Hoff2018-11-274-52/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Ignore __pycache__ directories in schema delta dirRichard van der Hoff2018-11-201-1/+1
| | | | | | | | Now that we use py3, compiled python ends up in __pycache__ rather than *.pyc.
* | Remove riot.im from the list of trusted Identity Servers in the default ↵Neil Johnson2018-11-201-1/+3
| | | | | | | | configuration (#4207)
* | Merge pull request #4204 from matrix-org/rav/logcontext_leak_fixesRichard van der Hoff2018-11-201-2/+3
|\ \ | | | | | | Fix some logcontext leaks
| * | Fix logcontext leak in EmailPusherRichard van der Hoff2018-11-191-2/+3
| | |
* | | Merge remote-tracking branch 'origin/master' into developAmber Brown2018-11-191-1/+1
|\ \ \ | | |/ | |/|
| * | versionAmber Brown2018-11-191-1/+1
| | |
| * | release 0.33.9rc1 v0.33.9rc1 github/release-v0.33.9 release-v0.33.9Neil Johnson2018-11-141-1/+1
| | |
* | | Fix fallback auth on Python 3 (#4197)Amber Brown2018-11-191-22/+16
| |/ |/|
* | Remove duplicate slashes in generated consent URLsTravis Ralston2018-11-152-3/+3
| |
* | Fix Content-Disposition in media repository (#4176)Amber Brown2018-11-153-90/+110
| |
* | Add option to track MAU stats (but not limit people) (#3830)Travis Ralston2018-11-153-35/+47
| |
* | Use <meta> tags to discover the per-page encoding of html previews (#4183)Amber Brown2018-11-151-9/+22
|/
* Add a test for the public T&Cs formRichard van der Hoff2018-11-141-1/+1
|
* Fix an internal server error when viewing the public privacy policyRichard van der Hoff2018-11-141-4/+7
|
* Merge pull request #4113 from matrix-org/dbkr/e2e_backup_versions_are_numbersDavid Baker2018-11-142-2/+70
|\ | | | | Make e2e backup versions numeric in the DB
| * Merge remote-tracking branch 'origin/develop' into ↵David Baker2018-11-0947-416/+763
| |\ | | | | | | | | | dbkr/e2e_backup_versions_are_numbers
| * | pep8David Baker2018-11-091-1/+2
| | |
| * | add docsDavid Baker2018-11-091-1/+4
| | |
| * | Remove unnecessary str()David Baker2018-11-091-1/+1
| | |
| * | Cast to int here tooDavid Baker2018-10-301-0/+5
| | |
| * | Cast bacjup version to int when queryingDavid Baker2018-10-301-1/+6
| | |
| * | Convert version back to a stringDavid Baker2018-10-301-0/+1
| | |
| * | Try & make it work on postgresDavid Baker2018-10-301-2/+2
| | |
| * | Make e2e backup versions numeric in the DBDavid Baker2018-10-293-2/+55
| | | | | | | | | | | | | | | We were doing max(version) which does not do what we wanted on a column of type TEXT.
* | | Merge pull request #4166 from matrix-org/erikj/drop_unknown_eventsErik Johnston2018-11-092-89/+74
|\ \ \ | |_|/ |/| | Drop incoming events from federation for unknown rooms
| * | Remove hack to support rejoining roomsErik Johnston2018-11-091-74/+42
| | |
| * | Simplify to always drop events if server isn't in the roomErik Johnston2018-11-091-14/+9
| | |
| * | Update synapse/federation/federation_server.pyRichard van der Hoff2018-11-091-1/+1
| | | | | | | | | Co-Authored-By: erikjohnston <erikj@jki.re>
| * | Update synapse/federation/federation_server.pyRichard van der Hoff2018-11-091-1/+1
| | | | | | | | | Co-Authored-By: erikjohnston <erikj@jki.re>
| * | Drop PDUs of unknown roomsErik Johnston2018-11-081-1/+23
| | | | | | | | | | | | | | | | | | When we receive events over federation we will need to know the room version to be able to correctly handle them, e.g. once we start changing event formats. Currently, we attempt to handle events in unknown rooms.
* | | Merge pull request #4164 from matrix-org/erikj/fix_device_comparisonErik Johnston2018-11-081-1/+4
|\ \ \ | | | | | | | | Fix noop checks when updating device keys
| * | | Lets convert bytes to unicode insteadErik Johnston2018-11-081-5/+3
| | | |
| * | | Fix noop checks when updating device keysErik Johnston2018-11-081-0/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Clients often reupload their device keys (for some reason) so its important for the server to check for no-ops before sending out device list update notifications. The check is broken in python 3 due to the fact comparing bytes and unicode always fails, and that we write bytes to the DB but get unicode when we read.
* | | fix parse_string docstringRichard van der Hoff2018-11-081-5/+4
| | |
* | | Fix encoding error for consent form on python3hera2018-11-081-1/+3
|/ / | | | | | | | | | | The form was rendering this as "b'01234....'". -- richvdh
* | Fix URL preview bugs (type error when loading cache from db, content-type ↵Amber Brown2018-11-082-10/+20
| | | | | | | | including quotes) (#4157)
* | Add config variables for enabling terms auth and the policy name (#4142)Travis Ralston2018-11-064-3/+21
| | | | | | | | So people can still collect consent the old way if they want to.
* | handle empty backups according to latest spec proposal (#4123)Hubert Chathi2018-11-052-10/+33
| | | | | | fixes #4056
* | Tests for user consent resource (#4140)Amber Brown2018-11-061-1/+1
| |
* | Add helpers for getting prev and auth events (#4139)Erik Johnston2018-11-068-44/+60
| | | | | | | | | | | | | | * Add helpers for getting prev and auth events This is in preparation for allowing the event format to change between room versions.
* | Set the encoding to UTF8 in the default logconfig (#4138)Amber Brown2018-11-031-0/+1
| |
* | Merge pull request #4137 from matrix-org/erikj/clean_up_eventsErik Johnston2018-11-023-7/+4
|\ \ | | | | | | Clean up event accesses and tests
| * | Clean up event accesses and testsErik Johnston2018-11-023-7/+4
| | | | | | | | | | | | | | | This is in preparation to refactor FrozenEvent to support different event formats for different room versions
* | | Fix typing being reset causing infinite syncs (#4127)Amber Brown2018-11-032-4/+24
| | |
* | | Merge pull request #4132 from matrix-org/rav/fix_device_list_lockingRichard van der Hoff2018-11-023-11/+128
|\ \ \ | | | | | | | | Fix locked upsert on device_lists_remote_cache
| * | | Add unique indexes to a couple of tablesRichard van der Hoff2018-11-023-6/+88
| | | | | | | | | | | | | | | | | | | | The indexes on device_lists_remote_extremeties can be unique, and they therefore should, to ensure that the db remains consistent.
| * | | Remove redundant database locks for device list updatesRichard van der Hoff2018-11-021-5/+40
| | | | | | | | | | | | | | | | We can rely on the application-level per-user linearizer.
* | | | Merge pull request #4133 from matrix-org/travis/fix-terms-authRichard van der Hoff2018-11-021-1/+1
|\ \ \ \ | | | | | | | | | | Fix logic error that prevented guests from seeing the privacy policy
| * | | | Fix logic error that prevented guests from seeing the privacy policyTravis Ralston2018-11-011-1/+1
| |/ / /
* | | | Merge pull request #4135 from matrix-org/erikj/fix_state_res_noneErik Johnston2018-11-021-0/+4
|\ \ \ \ | |/ / / |/| | | Fix None exception in state res v2
| * | | Fix None exception in state res v2Erik Johnston2018-11-021-0/+4
| |/ /
* | | Merge pull request #4004 from matrix-org/travis/login-termsTravis Ralston2018-11-015-17/+135
|\ \ \ | |/ / |/| | Add m.login.terms to the registration flow
| * | Include a version query string arg for the consent routeTravis Ralston2018-10-312-3/+8
| | |
| * | Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-3145-879/+1761
| |\ \
| * \ \ Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-2446-503/+1136
| |\ \ \
| * \ \ \ Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-1821-106/+472
| |\ \ \ \
| * | | | | pep8Travis Ralston2018-10-153-14/+3
| | | | | |
| * | | | | Ensure the terms params are actually providedTravis Ralston2018-10-151-0/+1
| | | | | |
| * | | | | Python is hardTravis Ralston2018-10-151-5/+6
| | | | | |
| * | | | | Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-1510-3/+1047
| |\ \ \ \ \
| * | | | | | Update login terms structure for the proposed language supportTravis Ralston2018-10-121-4/+7
| | | | | | |
| * | | | | | Rely on the lack of ?u to represent public accessTravis Ralston2018-10-122-10/+6
| | | | | | | | | | | | | | | | | | | | | also general cleanup
| * | | | | | Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-1218-125/+224
| |\ \ \ \ \ \
| * | | | | | | Use a flag rather than a new route for the public policyTravis Ralston2018-10-033-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | This also means that the template now has optional parameters, which will need to be documented somehow.
| * | | | | | | Auto-consent to the privacy policy if the user registered with termsTravis Ralston2018-10-031-0/+6
| | | | | | | |
| * | | | | | | Make the terms flow requriedTravis Ralston2018-10-031-4/+4
| | | | | | | |
| * | | | | | | Flesh out the fallback auth for termsTravis Ralston2018-10-031-7/+67
| | | | | | | |
| * | | | | | | Supply params for terms auth stageTravis Ralston2018-10-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | As per https://github.com/matrix-org/matrix-doc/pull/1692
| * | | | | | | Incorporate Dave's work for GDPR login flowsTravis Ralston2018-10-034-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | As per https://github.com/vector-im/riot-web/issues/7168#issuecomment-419996117
* | | | | | | | Merge pull request #4128 from matrix-org/erikj/state_res_v2_versionErik Johnston2018-11-012-2/+7
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add STATE_V2_TEST room version
| * | | | | | | | Add STATE_V2_TEST room versionErik Johnston2018-11-012-2/+7
| | |_|_|_|_|/ / | |/| | | | | |
* | | | | | | | Merge branch 'master' into developAmber Brown2018-11-011-1/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
| * | | | | | | versionAmber Brown2018-11-011-1/+1
| | | | | | | |
| * | | | | | | version bumpAmber Brown2018-10-311-1/+1
| | | | | | | |
| * | | | | | | Fix search 500ing (#4122)Amber Brown2018-10-311-2/+6
| | | | | | | |
| * | | | | | | version bumpAmber Brown2018-10-291-1/+1
| | | | | | | |
* | | | | | | | Merge pull request #4101 from matrix-org/rav/aliases_for_upgradesRichard van der Hoff2018-10-312-14/+140
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Attempt to move room aliases on room upgrades
| * | | | | | | | Avoid else clause on exception for clarityRichard van der Hoff2018-10-311-2/+1
| | | | | | | | |
| * | | | | | | | Attempt to move room aliases on room upgradesRichard van der Hoff2018-10-312-14/+141
| | | | | | | | |
* | | | | | | | | Log some bits about event creation (#4121)Richard van der Hoff2018-10-312-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found these helpful in debugging my room upgrade tests.
* | | | | | | | | Remove fetching keys via the deprecated v1 kex method (#4120)Amber Brown2018-10-312-106/+12
| | | | | | | | |
* | | | | | | | | Remove deprecated v1 key exchange endpoint (#4119)Amber Brown2018-10-314-113/+1
| | | | | | | | |
* | | | | | | | | Fix search 500ing (#4122)Amber Brown2018-10-311-2/+6
| | | | | | | | |
* | | | | | | | | Remove the unused /pull federation API (#4118)Amber Brown2018-10-312-14/+0
| | | | | | | | |
* | | | | | | | | Merge pull request #4006 from matrix-org/erikj/purge_state_groupsErik Johnston2018-10-304-48/+137
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Delete unreferenced state groups during purge
| * | | | | | | | | Move _find_unreferenced_groupsErik Johnston2018-10-292-81/+83
| | | | | | | | | |
| * | | | | | | | | Fix set operations thinkoErik Johnston2018-10-291-3/+4
| | | | | | | | | |
| * | | | | | | | | Don't make temporary listErik Johnston2018-10-291-3/+2
| | | | | | | | | |
| * | | | | | | | | Make SQL a bit cleanerErik Johnston2018-10-291-3/+2
| | | | | | | | | |
| * | | | | | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-10-2659-948/+2189
| |\ \ \ \ \ \ \ \ \ | | | |/ / / / / / / | | |/| | | | | | | | | | | | | | | | | erikj/purge_state_groups
| * | | | | | | | | pep8Erik Johnston2018-10-191-1/+1
| | | | | | | | | |
| * | | | | | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-10-1949-250/+1763
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | erikj/purge_state_groups
| * | | | | | | | | | Batch process handling state groupsErik Johnston2018-10-192-101/+92
| | | | | | | | | | |
| * | | | | | | | | | Fix up commentsErik Johnston2018-10-121-3/+3
| | | | | | | | | | |
| * | | | | | | | | | Add state_group index to event_to_state_groupsErik Johnston2018-10-043-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed to efficiently check for unreferenced state groups during purge.
| * | | | | | | | | | Delete unreferened state groups during purgeErik Johnston2018-10-042-6/+77
| | | | | | | | | | |
* | | | | | | | | | | Write some tests for the email pusher (#4095)Amber Brown2018-10-303-6/+14
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | |
* | | | | | | | | | Deduplicate device updates sent over replicationErik Johnston2018-10-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently send several kHz of device list updates over replication occisonally, which often causes the replications streams to lag and then get dropped. A lot of those updates will actually be duplicates, since we don't send e.g. device_ids across replication, so let's deduplicate it when we pull them out of the database.
* | | | | | | | | | Don't truncate command name in metricsErik Johnston2018-10-291-2/+2
| | | | | | | | | |
* | | | | | | | | | Delete the disused & unspecced identicon functionality (#4106)Amber Brown2018-10-294-74/+0
| |_|_|/ / / / / / |/| | | | | | | |
* | | | | | | | | Merge pull request #4100 from matrix-org/rav/room_upgrade_avatarRichard van der Hoff2018-10-291-1/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Remember to copy the avatar on room upgrades
| * | | | | | | | | Remember to copy the avatar on room upgradesRichard van der Hoff2018-10-261-1/+2
| | | | | | | | | |
* | | | | | | | | | Merge pull request #4099 from matrix-org/rav/upgrade_odd_plsRichard van der Hoff2018-10-291-44/+81
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Better handling of odd PLs during room upgrades
| * | | | | | | | | | Better handling of odd PLs during room upgradesRichard van der Hoff2018-10-271-44/+81
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes handling of rooms where we have permission to send the tombstone, but not other state. We need to (a) fail more gracefully when we can't send the PLs in the old room, and (b) not set the PLs in the new room until we are done with the other stuff.
* | | | | | | | | | Merge pull request #4091 from matrix-org/rav/room_version_upgradesRichard van der Hoff2018-10-297-38/+323
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Room version upgrade support
| * | | | | | | | | optimise state copyingRichard van der Hoff2018-10-261-7/+5
| | | | | | | | | |
| * | | | | | | | | Address review commentsRichard van der Hoff2018-10-262-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve comments, get old room state from the context we already have
| * | | | | | | | | restrict PLs in old roomRichard van der Hoff2018-10-251-1/+43
| | | | | | | | | |
| * | | | | | | | | copy stateRichard van der Hoff2018-10-251-11/+26
| | | | | | | | | |
| * | | | | | | | | preserve PLsRichard van der Hoff2018-10-251-1/+7
| | | | | | | | | |
| * | | | | | | | | preserve room visibilityRichard van der Hoff2018-10-252-4/+6
| | | | | | | | | |
| * | | | | | | | | Basic initial support for room upgradesRichard van der Hoff2018-10-255-0/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently just creates a new, empty, room, and sends a tombstone in the old room.
| * | | | | | | | | Allow power_level_content_override=None for _send_events_for_new_roomRichard van der Hoff2018-10-251-5/+6
| | | | | | | | | |
| * | | | | | | | | Make room_member_handler a member of RoomCreationHandlerRichard van der Hoff2018-10-252-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... to save passing it into `_send_events_for_new_room`
| * | | | | | | | | Factor _generate_room_id out of create_roomRichard van der Hoff2018-10-251-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we're going to need this for room upgrades.
* | | | | | | | | | Make the replication logger quieter (#4108)Amber Brown2018-10-291-1/+1
| |_|_|/ / / / / / |/| | | | | | | |
* | | | | | | | | Port register_new_matrix_user to Python 3 and add tests (#4085)Amber Brown2018-10-262-0/+215
|/ / / / / / / /
* | | | | | | | Refactor state group lookup to reduce DB hits (#4011)Erik Johnston2018-10-259-420/+603
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | Merge pull request #4051 from matrix-org/erikj/alias_disallow_listErik Johnston2018-10-255-15/+140
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add config option to control alias creation
| * \ \ \ \ \ \ \ Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-10-2546-443/+1124
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | erikj/alias_disallow_list
| * | | | | | | | | Use allow/denyErik Johnston2018-10-251-6/+6
| | | | | | | | | |
| * | | | | | | | | Use match rather than searchErik Johnston2018-10-241-2/+3
| | | | | | | | | |
| * | | | | | | | | Anchor returned regex to start and end of stringErik Johnston2018-10-191-2/+6
| | | | | | | | | |
| * | | | | | | | | Add config option to control alias creationErik Johnston2018-10-195-15/+135
| | | | | | | | | |
* | | | | | | | | | Merge pull request #4081 from matrix-org/neilj/fix_mau_initNeil Johnson2018-10-254-31/+84
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | fix race condiftion in calling initialise_reserved_users
| * | | | | | | | | add new lineNeil Johnson2018-10-251-0/+1
| | | | | | | | | |
| * | | | | | | | | improve commentsNeil Johnson2018-10-251-6/+6
| | | | | | | | | |
| * | | | | | | | | fix style inconsistenciesNeil Johnson2018-10-242-15/+47
| | | | | | | | | |
| * | | | | | | | | commit transaction before closingNeil Johnson2018-10-241-0/+1
| | | | | | | | | |
| * | | | | | | | | Merge branch 'develop' of github.com:matrix-org/synapse into neilj/fix_mau_initNeil Johnson2018-10-2431-368/+994
| |\ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|_|/ | | |/| | | | | | |
| * | | | | | | | | remove white spaceNeil Johnson2018-10-231-2/+1
| | | | | | | | | |
| * | | | | | | | | fix race condiftion in calling initialise_reserved_usersNeil Johnson2018-10-233-25/+45
| | | | | | | | | |
* | | | | | | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Neil Johnson2018-10-2583-676/+2779
|\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | matthew/autocreate_autojoin
| * | | | | | | | | Merge remote-tracking branch 'origin/develop' into ↵Richard van der Hoff2018-10-2412-67/+665
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rav/fix_event_filter_validation
| | * \ \ \ \ \ \ \ \ Merge pull request #4082 from matrix-org/rav/fix_pep8Richard van der Hoff2018-10-246-6/+6
| | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix a number of flake8 errors
| | | * | | | | | | | | Fix a number of flake8 errorsRichard van der Hoff2018-10-246-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broadly three things here: * disable W504 which seems a bit whacko * remove a bunch of `as e` expressions from exception handlers that don't use them * use `r""` for strings which include backslashes Also, we don't use pep8 any more, so we can get rid of the duplicate config there.
| | * | | | | | | | | | Merge pull request #4040 from matrix-org/erikj/states_res_v2_rebaseErik Johnston2018-10-246-61/+659
| | |\ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / | | |/| | | | | | | | | Add v2 state resolution algorithm
| | | * | | | | | | | | CommentErik Johnston2018-10-241-2/+5
| | | | | | | | | | | |
| | | * | | | | | | | | Rename resolve_events_with_factoryErik Johnston2018-10-244-11/+11
| | | | | | | | | | | |
| | | * | | | | | | | | Update event_auth table for rejected eventsErik Johnston2018-10-161-15/+21
| | | | | | | | | | | |
| | | * | | | | | | | | Fix up use of resolve_events_with_factoryErik Johnston2018-10-161-13/+10
| | | | | | | | | | | |
| | | * | | | | | | | | User event.sender rather than alias event.user_idErik Johnston2018-10-161-1/+1
| | | | | | | | | | | |
| | | * | | | | | | | | Add v2 state res algorithm.Erik Johnston2018-10-163-24/+616
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We hook this up to the vdh test room version.
| * | | | | | | | | | | Allow backslashes in event field filtersRichard van der Hoff2018-10-241-1/+4
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a bug introduced in https://github.com/matrix-org/synapse/pull/1783 which meant that single backslashes were not allowed in event field filters. The intention here is to allow single-backslashes, but disallow double-backslashes.
| * | | | | | | | | | Merge pull request #4075 from matrix-org/rav/fix_pusher_logcontextsRichard van der Hoff2018-10-247-141/+141
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Clean up the way logcontexts and threads work in the pushers
| | * | | | | | | | | | Fix start_pushers vs _start_pushers confusionRichard van der Hoff2018-10-241-3/+3
| | | | | | | | | | | |
| | * | | | | | | | | | sanity-check the is_processing flagRichard van der Hoff2018-10-242-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and rename it, for even more sanity
| | * | | | | | | | | | Run PusherPool.start as a background processRichard van der Hoff2018-10-221-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't do anything with the result, so this is needed to give this code a logcontext.
| | * | | | | | | | | | Make on_started synchronous tooRichard van der Hoff2018-10-223-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings it into line with on_new_notifications and on_new_receipts. It requires a little bit of hoop-jumping in EmailPusher to load the throttle params before the first loop.
| | * | | | | | | | | | Remove redundant run_as_background_process() from pusherpoolRichard van der Hoff2018-10-227-50/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `on_new_notifications` and `on_new_receipts` in `HttpPusher` and `EmailPusher` now always return synchronously, so we can remove the `defer.gatherResults` on their results, and the `run_as_background_process` wrappers can be removed too because the PusherPool methods will now complete quickly enough.
| | * | | | | | | | | | Give pushers their own background logcontextRichard van der Hoff2018-10-222-58/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each pusher has its own loop which runs for as long as it has work to do. This should run in its own background thread with its own logcontext, as other similar loops elsewhere in the system do - which means that CPU usage is consistently attributed to that loop, rather than to whatever request happened to start the loop.
| | * | | | | | | | | | move get_all_pushers call downRichard van der Hoff2018-10-221-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simplifies the interface to _start_pushers
| | * | | | | | | | | | Factor PusherPool._start_pusher out of _start_pushersRichard van der Hoff2018-10-221-18/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and use it from start_pusher_by_id. This mostly simplifies start_pusher_by_id.
| | * | | | | | | | | | Rename _refresh_pusherRichard van der Hoff2018-10-222-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is public (or at least, called from outside the class), so ought to have a better name.
| * | | | | | | | | | | Merge pull request #4063 from matrix-org/erikj/cleaup_alias_creationErik Johnston2018-10-243-64/+55
| |\ \ \ \ \ \ \ \ \ \ \ | | | |_|_|/ / / / / / / | | |/| | | | | | | | | Clean up room alias creation
| | * | | | | | | | | | Clean up room alias creationErik Johnston2018-10-193-64/+55
| | | |_|_|_|_|_|_|_|/ | | |/| | | | | | | |
| * | | | | | | | | | Merge pull request #3969 from turt2live/travis/fix-federated-group-requestsTravis Ralston2018-10-232-8/+22
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Handle HttpResponseException more safely for federated groups
| | * | | | | | | | | | Comments helpTravis Ralston2018-10-231-0/+5
| | | | | | | | | | | |
| | * | | | | | | | | | isortTravis Ralston2018-10-121-1/+1
| | | | | | | | | | | |
| | * | | | | | | | | | More sane handling of group errors and pep8Travis Ralston2018-10-121-4/+5
| | | | | | | | | | | |
| | * | | | | | | | | | Merge branch 'develop' into travis/fix-federated-group-requestsTravis Ralston2018-10-1249-314/+590
| | |\ \ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|_|/ / | | | |/| | | | | | | |
| | * | | | | | | | | | Remove debugging statementTravis Ralston2018-09-261-1/+0
| | | | | | | | | | | |
| | * | | | | | | | | | Handle HttpResponseException more safely for federated groupsTravis Ralston2018-09-261-2/+11
| | | | | | | | | | | |
| | * | | | | | | | | | Fix exception documentation in matrixfederationclient.pyTravis Ralston2018-09-261-6/+6
| | | | | | | | | | | |
| * | | | | | | | | | | Give some more things logcontexts (#4077)Richard van der Hoff2018-10-232-7/+11
| | | | | | | | | | | |
| * | | | | | | | | | | Correctly account for cpu usage by background threads (#4074)Richard van der Hoff2018-10-235-80/+96
| | |_|_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrap calls to deferToThread() in a thing which uses a child logcontext to attribute CPU usage to the right request. While we're in the area, remove the logcontext_tracer stuff, which is never used, and afaik doesn't work. Fixes #4064
| * | | | | | | | | | Merge pull request #4076 from matrix-org/rav/fix_init_logcontextsRichard van der Hoff2018-10-221-8/+22
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Run MAU queries as background processes
| | * | | | | | | | | | Run MAU queries as background processesRichard van der Hoff2018-10-201-8/+22
| | | |_|_|/ / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #3820
| * | | | | | | | | | Merge pull request #4073 from matrix-org/rav/require_psutilRichard van der Hoff2018-10-222-10/+5
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Make psutil an explicit dependency
| | * | | | | | | | | | Make psutil an explicit dependencyRichard van der Hoff2018-10-192-10/+5
| | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of #4027, we require psutil to be installed, so it should be in our dependency list. We can also remove some of the conditional import code introduced by #992. Fixes #4062.
| * / / / / / / / / / Make scripts/ and scripts-dev/ pass pyflakes (and the rest of the codebase ↵Amber Brown2018-10-209-71/+70
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on py3) (#4068)
| * | | | | | | | | Merge pull request #4069 from matrix-org/rav/fix_email_templates_4065Richard van der Hoff2018-10-192-28/+20
| |\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ / / | |/| | | | | | | | Calculate absolute path for email templates
| | * | | | | | | | Calculate absolute path for email templatesRichard van der Hoff2018-10-192-28/+20
| | | | | | | | | |
| * | | | | | | | | Fix manhole on py3 (pt 2) (#4067)Amber Brown2018-10-191-0/+2
| | | | | | | | | |
| * | | | | | | | | Make the metrics less racy (#4061)Amber Brown2018-10-192-16/+21
| | | | | | | | | |
| * | | | | | | | | make a bytestringAmber Brown2018-10-191-2/+2
| | |_|_|/ / / / / | |/| | | | | | |
| * | | | | | | | Merge branch 'master' into developRichard van der Hoff2018-10-1811-5/+369
| |\| | | | | | |
| | * | | | | | | 0.33.7 v0.33.7Richard van der Hoff2018-10-181-1/+1
| | | | | | | | |
| | * | | | | | | v0.33.7rc2Richard van der Hoff2018-10-171-1/+1
| | | | | | | | |
| | * | | | | | | Fix incorrect truncation in get_missing_eventsRichard van der Hoff2018-10-174-35/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's quite important that get_missing_events returns the *latest* events in the room; however we were pulling event ids out of the database until we got *at least* 10, and then taking the *earliest* of the results. We also shouldn't really be relying on depth, and should be checking the room_id.
| | * | | | | | | Put the warning blob at the top of the fileRichard van der Hoff2018-10-171-6/+9
| | | | | | | | |
| | * | | | | | | Ship the email templates as package_dataRichard van der Hoff2018-10-1710-4/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | move the example email templates into the synapse package so that they can be used as package data, which should mean that all of the packaging mechanisms (pip, docker, debian, arch, etc) should now come with the example templates. In order to grandfather in people who relied on the templates being in the old place, check for that situation and fall back to using the defaults if the templates directory does not exist.
| | * | | | | | | version bumpAmber Brown2018-10-151-1/+1
| | | |_|_|_|_|/ | | |/| | | | |
| * | | | | | | Fix bug where we raised StopIteration in a generatorErik Johnston2018-10-171-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This made python 3.7 unhappy
| * | | | | | | Fix roomlist since tokens on Python 3 (#4046)Will Hunt2018-10-172-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | Thanks @Half-Shot !!!
| * | | | | | | Fix incorrect truncation in get_missing_eventsRichard van der Hoff2018-10-164-35/+25
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's quite important that get_missing_events returns the *latest* events in the room; however we were pulling event ids out of the database until we got *at least* 10, and then taking the *earliest* of the results. We also shouldn't really be relying on depth, and should be checking the room_id.
| * | | | | | Various cleanups in the federation client code (#4031)Richard van der Hoff2018-10-163-61/+63
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Improve logging: log things in the right order, include destination and txids in all log lines, don't log successful responses twice - Fix the docstring on TransportLayerClient.send_transaction - Don't use treq.request, which is overcomplicated for our purposes: just use a twisted.web.client.Agent. - simplify the logic for setting up the bodyProducer - fix bytes/str confusions
| * | | | | Merge pull request #4019 from matrix-org/dbkr/e2e_backupsDavid Baker2018-10-158-0/+1044
| |\ \ \ \ \ | | | | | | | | | | | | | | E2E backups
| | * | | | | missed oneDavid Baker2018-10-121-0/+1
| | | | | | |